![]() |
![]() |
![]() |
![]() |
TCP operations
To start a TCP connection, a Client computer must connect to a Server computer. When this is successfully set up, there will be a "socket". Once the socket is set up, both the Server and the Client can send and receive TCP data using the socket.
To set up a TCP Server using the Sourcerer, you must do the following steps
- Start up a TCP server...
- Send TCP data... or Receive TCP data...
(The Server may Send and Receive TCP data as many times as is desired, and in any order desired. )
- Stop sending or receiving TCP data...
- Shut down a TCP server...
To set up a TCP Client using the Sourcerer, you must do the following steps
- Create a TCP client connection...
- Send TCP data... or Receive TCP data...
(The Client may Send and Receive TCP data as many times as is desired, and in any order desired.)
- Stop sending or receiving TCP data...
To set up the Server and Client, it will be necessary to set the port number for the TCP connection. Port numbers 1025-65535 are typically available. The exact number is not important as long as the Client and the Server are using the same port number, and the port is not being used by another application.
Be aware that Java will wait (block) when a TCP server has been set up, waiting for a client to connect. It will also wait when trying to receive TCP data. This should be taken into consideration when considering the Client/Server interaction.
UDP operations
UDP does not differentiate between Client and Server like TCP does. To set up a UDP connection, you must do the following steps
- Start up UDP...
- Send UDP data... or Receive UDP data... or Reply to UDP data...
(You may Send and Receive UDP data in any order, and as many times as is desired. The Reply option should only be used after UDP data has already been received.)
- Shut down UDP...
The Send and Receive options have many options. It is important to keep track of the port number which is being used, as well as the names of the UDP packet objects which are used to send and receive data, since UDP packets contain information about the connection.
Be aware that Java will wait (block) when trying to receive UDP data.
Data Representations, Inc. http://www.datarepresentations.com support@datarepresentations.com sales@datarepresentations.com |
![]() |
![]() |
![]() |
![]() |