|
-
Jan 12th, 2000, 03:51 AM
#1
Thread Starter
Addicted Member
Could someone clearly explain the difference between difference between TCP Protocol and UDP Protocol.
------------------
OmarSwan
[email protected]
http://omarswan.cjb.net
"Jesus is Lord"
-
Jan 12th, 2000, 05:21 AM
#2
Hyperactive Member
This is from MSDN:
TCP Basics
The Transfer Control Protocol allows you to create and maintain a connection to a remote computer. Using the connection, both computers can stream data between themselves.
If you are creating a client application, you must know the server computer's name or IP address (RemoteHost property), as well as the port (RemotePort property) on which it will be "listening." Then invoke the Connect method.
If you are creating a server application, set a port (LocalPort property) on which to listen, and invoke the Listen method. When the client computer requests a connection, the ConnectionRequest event will occur. To complete the connection, invoke the Accept method within the ConnectionRequest event.
Once a connection has been made, either computer can send and receive data. To send data, invoke the SendData method. Whenever data is received, the DataArrival event occurs. Invoke the GetData method within the DataArrival event to retrieve the data.
UDP Basics
The User Datagram Protocol (UDP) is a connectionless protocol. Unlike TCP operations, computers do not establish a connection. Also, a UDP application can be either a client or a server.
To transmit data, first set the client computer's LocalPort property. The server computer then needs only to set the RemoteHost to the Internet address of the client computer, and the RemotePort property to the same port as the client computer's LocalPort property, and invoke the SendData method to begin sending messages. The client computer then uses the GetData method within the DataArrival event to retrieve the sent messages.
------------------
CompuGEEK
-
Jan 12th, 2000, 05:28 AM
#3
Thread Starter
Addicted Member
Thanks Alot.
------------------
OmarSwan
[email protected]
http://omarswan.cjb.net
"Jesus is Lord"
-
Jan 27th, 2004, 02:41 AM
#4
Addicted Member
I love the control over the TCP Protocol but I find the best thing about the UDP Protocol is the speed and also the ability to broadcast messages to the entire network using the address 255.255.255.255
Scott
**********
Visit my web page at www.hyphenex.ugtech.net
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|