datagram

Problems with UDP in windows 10. UWP

六月ゝ 毕业季﹏ 提交于 2019-11-27 07:24:23
问题 I am having the following problem: I am communicating 2 different machines in local network with UDP. In one side I have a Windows 7 machine with 4.5 framework installed. I am using the class System.Net with this code: public static void UDPWriter() { Task.Run(async () => { byte[] data = new byte[10000]; IPEndPoint ipep = new IPEndPoint(IPAddress.Pars("192.168.0.16"), 5002); Socket udpClient = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); udpClient.Connect(ipep);

Sending packets to 255.255.255.255 by Java DatagramSocket fails

情到浓时终转凉″ 提交于 2019-11-27 06:38:44
问题 I'm programming a networking program in java , and I want to send some Packets to 255.255.255.255, but it fails , even when I send them to 192.168.1.255, which according to the output of ifconfig command , is the broadcast address. But when I send them to my mate's IP it works fine. Here's the code to my program : public class StackOverFlow { public static void main(String[] args) { Network net= new Network(); Scanner input= new Scanner(System.in); while(input.hasNext()) net.sendMessage(input

Why do I get UDP datagrams out of order even with processes running locally?

北城余情 提交于 2019-11-27 04:49:24
问题 I'm developing a java interface between a streaming server and a flash client. I noticed that UDP datagrams can reach my interface out of order even if both processes are running locally. Is that normal? I thought that as no datagram has to go through any router or any network device, then that should not be happening. 回答1: Actually there are no guarantees of ordering and reception about UDP packets, even if they are sent by localhost on localhost. Just because the specification of the

What is the max size of AF_UNIX datagram message that can be sent in linux?

给你一囗甜甜゛ 提交于 2019-11-26 18:24:02
问题 Currently I'm hitting a hard limit of 130688 bytes. If I try and send anything larger in one message I get a ENOBUFS error. I have checked the net.core.rmem_default, net.core.wmem_default, net.core.rmem_max, net.core.wmem_max, and net.unix.max_dgram_qlen sysctl options and increased them all but they have no effect because these deal with the total buffer size not the message size. I have also set the SO_SNDBUF and SO_RCVBUF socket options, but this has the same issue as above. The default