Re: sending objects over sockets?

From: Roedy Green (roedy_at_seewebsite.com)
Date: 10/25/03


Date: Sat, 25 Oct 2003 20:43:56 GMT

On 25 Oct 2003 13:03:06 -0700, donalmurtagh@yahoo.co.uk (Don) wrote or
quoted :

>Is it possible to do
>something similar with a UDP MulticastSocket? If so, how do you
>send/receive the object?

 All you need do is write the object to a byte array. See
http://mindprod.com/fileio.html for how. Then you can bundle that
byte array as your payload in a UDP or Multicast UDP packet. The only
catch is just how long can the packet be? I don't know off the top of
my head how big a UDP packet can be, but I would think it would be in
the order of 128 bytes or so, unless there is some sort of packet
reassembly protocol for jumbo packets now functioning.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming. 
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.


Relevant Pages

  • Re: Multiple closed networks and UDP. Please help me.
    ... Each of the three computers will be in its own closed network. ... I have worked with TCP many times, but never UDP. ... When I open a socket to receive one UDP socket stream do I ... there is a packet to receive. ...
    (microsoft.public.vc.mfc)
  • Re: Multiple closed networks and UDP. Please help me.
    ... Each of the three computers will be in its own closed network. ... I have worked with TCP many times, but never UDP. ... I believe that the TCP connection will be assigned based on the IP ... there is a packet to receive. ...
    (microsoft.public.vc.mfc)
  • Re: Multiple closed networks and UDP. Please help me.
    ... Each of the three computers will be in its own closed network. ... I have worked with TCP many times, but never UDP. ... I believe that the TCP connection will be assigned based on the IP address. ... there is a packet to receive. ...
    (microsoft.public.vc.mfc)
  • Re: Multiple closed networks and UDP. Please help me.
    ... They are based on how I would use UDP in this circumstance. ... Each of the three computers will be in its own closed network. ... I believe that the TCP connection will be assigned based on the IP address. ... there is a packet to receive. ...
    (microsoft.public.vc.mfc)
  • Re: Determining if it is "safe" to send UDP packets
    ... for receiving Udp data. ... I'm receiving from a camera lines of data at 55 Hz. ... the next packet hits the wire. ... Another problem with TCP is its assumption that a lost packet is due to ...
    (microsoft.public.win32.programmer.kernel)