Presentation is loading. Please wait.

Presentation is loading. Please wait.

Socket Programming A review By Snehal Kale. What is a socket? An End Point of a 2-way Communication Link Used in Client – Server Communication Bound to.

Similar presentations


Presentation on theme: "Socket Programming A review By Snehal Kale. What is a socket? An End Point of a 2-way Communication Link Used in Client – Server Communication Bound to."— Presentation transcript:

1 Socket Programming A review By Snehal Kale

2 What is a socket? An End Point of a 2-way Communication Link Used in Client – Server Communication Bound to a port Port 80 Port 2000 Bi-Directional Link

3 What is a socket? Used by TCP Server Socket: java.net.ServerSocket Client Socket: java.net.Socket What is a protocol? -An agreement for communication between server and client -Defined by the server

4 Steps 1.Open a Socket 2.Open an Input stream and Output Stream for the socket 3.Read from and Write to the stream according to the server’s protocol 4.Close the stream 5.Close the socket

5 Example MyServer.java authenticates Alice, Bob and Mark With server process ON, try netstat -a


Download ppt "Socket Programming A review By Snehal Kale. What is a socket? An End Point of a 2-way Communication Link Used in Client – Server Communication Bound to."

Similar presentations


Ads by Google