TCP socket to UDP socket?

TCP socket to UDP socket?

Post by asche » Sat, 01 Mar 2003 02:47:10



Hi -
  This may be a dumb question, but can you create a server TCP socket
  and connect to it by opening a client UDP socket?  I can't think of a
  reason why I would ever design a (simple) program to do this, but if
  you were communicating across different networks that had different
  protocols defined, isn't the job of a protocal layer to examine the
  incoming packet and send it to the approriate destination?  Am I on
  the right page here, or am I comparing apples and oranges?
I'm just trying to get a grasp on these network layers and how they
function, and trying to figure out the most efficent way to use them in
standard socketing.

thanks in advance-
Dan

--
Posted via http://dbforums.com

 
 
 

TCP socket to UDP socket?

Post by Barry Margoli » Sat, 01 Mar 2003 03:58:40




>Hi -
>  This may be a dumb question, but can you create a server TCP socket
>  and connect to it by opening a client UDP socket?

No.  They're two entirely different protocols.  The only thing they have in
common is that they use IP to get their packets from one machine to the
other.

--

Genuity Managed Services, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

1. UDP server: single socket or multiple socket?

I am writing a UDP server.  Right now I am using a single socket; all
clients send messages to that socket and the server responds on that
socket.  The server just does a recvfrom().

I could create multiple sockets and call select() instead.  Would
there be any advantage to doing so?  Using the single socket makes for
very clean, simple server code, and I wouldn't want to complicate the
server needlessly.

So what are the advantages (if any) of using multiple sockets for a
UDP server?

Thanks.

2. bootdisks hang

3. UNIX domain sockets vs TCP sockets

4. Problem installing SSH port

5. x.25 socket and tcp/ip socket

6. Diamond Fireport 40

7. Freeware SQL database for linux

8. socket error 98 on RedHat 7.0, server restart tcp socket.

9. idle tcp sockets and dead sockets

10. x.25 socket and tcp/ip socket

11. detecting tcp/udp socket bind in kernel module

12. sockets (TCP/UDP) + SIGIO