python session 8
TRANSCRIPT
WELCOME TO PYTHON SESSION 6WELCOME TO PYTHON SESSION 6
AJENDA
Socket.
Socket Programming.
What is the uses of socket in networking.
What is Socket?
Sockets are the endpoints of a bidirectional communications channel.
Sockets may communicate within a process, between processes on the same machine, or between processes on different continents..
Creating a socket in Client end
Connect to a Server
Sending Data
Receiving Data
reply = s.recv(4096)
Print replay.
Socket connection in servers
Programming socket servers
1. Open a socket
2. Bind to a address(and port).
3. Listen for incoming connections.
4. Accept connections
5. Read/Send
Bind a socket
Accept connection
Single Connection
Mutiple Connections
Handling Connections
THANK YOU
Reference Link:
http://www.binarytides.com/python-socket-programming-tutorial/