0% found this document useful (0 votes)
6 views

Slides Java Networking With Channels Reactive Programming and Virtual Threads Creating a Simple Client Server Connection Using ServerSocket (1)

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Slides Java Networking With Channels Reactive Programming and Virtual Threads Creating a Simple Client Server Connection Using ServerSocket (1)

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Communicating with TCP/IP

Because it's so common, I'll start by using TCP/IP client server examples in the next
few videos.
This means, I'll use a reliable two-way communication link between the client and
the server.
At the end of the last video I talked about the fact that I'll need to write two
applications, to demonstrate how to do network coding.
One application will be the server, the other will be the client.

COMPLETE JAVA MASTERCLASS


Creating a Simple Client-Server Connection using
ServerSocket
The Typical TCP/IP Client-Server Interaction

• The Server needs to first create a ServerSocket, and bind it to a port.


• The Server calls accept() on the ServerSocket, which returns a Socket when a
client connects.
• The Client creates a Socket using a constructor that takes a host and port.
• The Server and Client use their respective sockets to exchange data.

COMPLETE JAVA MASTERCLASS


Creating a Simple Client-Server Connection using
ServerSocket

You might also like