Main Site Documentation

Connetion less Socket


#1

Hello,

I have build a system which reads and processes data and sends this out over one of the COM ports. I want to do this exact some thing with ethernet, but I don’t want to wait for an connection. I just want to send my data out like my COM port:

byte[] outBuffer = Encoding.UTF8.GetBytes("$$65226" + "#" + SPN + "#" + FMI + "\n\r\r");
                                    serialPort.Write(outBuffer, 0, outBuffer.Length);

#2

Then you’re looking for UDP sockets.


#3

OK, an UDP socket could work, but I don’t know to which IPAddress i’m sending data and I don’t want to broadcast anything over the network.


#4

you can’t have it all !


#5

Do you have a Example with broadcast for me?


#6

Have a look here:
UDP Receive: http://code.tinyclr.com/project/282/udp-receive-with-fez-connect/
UDP Send: http://code.tinyclr.com/project/283/udp-send-with-fez-connect/
UDP Tranceive: http://code.tinyclr.com/project/284/udp-transceive-data-with-fez-connect/


#7

Do you have an other solution for this?