Skip to content

Instantly share code, notes, and snippets.

@kevindoran
Last active December 16, 2015 11:38
Show Gist options
  • Save kevindoran/5428504 to your computer and use it in GitHub Desktop.
Save kevindoran/5428504 to your computer and use it in GitHub Desktop.
Difference between the Bluetooth and Internet client-server applications.
# For the Server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(("192.168.1.17",50001)) # The Bluetooth MAC Address and RFCOMM port is replaced with an IP Address and a TCP port.
# For the Client
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("192.168.1.17",50001))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment