Все вопросы: [udp]

181 вопросов

похожие теги: udp-data-transfer
0
голосов
3ответов
1212 просмотров

Java NIO UDP - Selector Hangs when trying to register

final DatagramChannel dc = DatagramChannel.open(); dc.configureBlocking(false); dc.socket().bind(localAddress); final SelDatagramChannel c = new SelDatagramChannel(dc, datagramListener); --->>>> final SelectionKey sk = dc.register(selector, SelectionKey....

0
голосов
1ответов
1448 просмотров

C: getting hostname from TCP and UDP socket?

I'm not really familiar with the connection protocols. I'm using the following code to examine connect() so I can get the hostname: #ifndef NI_MAXHOST #define NI_MAXHOST 1025 #endif int error; char hostname[NI_MAXHOST] = ""; error = getnameinfo(serv_addr, addrlen, hostname, NI_MAXHOST...

0
голосов
2ответов
186 просмотров

Linux vs Win runtime timings

I have an application which was ported from Windows to Linux. Now the same code compiles on VS C++ and g++, but there is a difference in performance when it's running on Win and when it's running on Linux. The scope of this application is caching. It's a node between a server and a client, and it...

0
голосов
1ответов
903 просмотров

C# UDP decoding datagrams fails randomly

I'm experiencing an issue in a multi threaded application and have been debugging it for the last 3 days but for the life of it can not figure it out. I'm writing this, hoping that I either have a DUH moment when typing this or somebody sees something obvious in the code snippets I provide. Here'...

0
голосов
1ответов
698 просмотров

Importance of ping - pong in udp p2p communication

I am quite new to socket programming. I was trying to make p2p communication using udp and did finally made it. While writing a program, the point I have observed is that communication between two peers does not take place if packets are not send from both sides. I read somewhere that in networki...

6
голосов
6ответов
5820 просмотров

Can the data in a UDP packet be assumed to be correct at the application level?

I recall reading somewhere that if a udp actually gets to the application layer that the data can assume to be intact. Disregarding the possibility of someone in the middle sending fake packets will the data I receive in the application layer always be what was sent out?

0
голосов
1ответов
2422 просмотров

UDP socket port allocation failure

I am creating a winsock UDP program. code i am using is shown below. I am always getting port assignment error. I am not able to understand why port always allocated is zero. If some can help me with this.... void UDPecho(const char *, const char *); void errexit(const char *, ...); #define ...

8
голосов
5ответов
9381 просмотров

implementing ack over UDP?

We have a system (built in C) in place that performs communication over UDP. Recently we have found a necessity to guarantee delivery of packets. My question is: what would be the minimum additions to a UDP based system to ensure delivery using ack packets? Also, ideally without having to mani...

0
голосов
3ответов
2521 просмотров

tool to create and send test udp datagrams

im looking for sth like: udpsend [udp-data] [target-ip] [target-port] eg. c:12321gt;udpsend "Hello, World" 192.168.1.111 4711 this should be out there anywhere, but i cant find it. thanks :)

10
голосов
6ответов
20161 просмотров

Winsock UDP packets being dropped?

We have a client/server communication system over UDP setup in windows. The problem we are facing is that when the throughput grows, packets are getting dropped. We suspect that this is due to the UDP receive buffer which is continuously being polled causing the buffer to be blocked and droppin...

7
голосов
2ответов
4213 просмотров

Why does mDNS (Bonjour, Avahi, etc) use UDP?

It seems to me that a lot of the problems with DNS, particularly security problems, have the root cause of DNS being implemented over UDP; for example the responder doesn't have to be who he says he is. I don't know the details of mDNS protocol (which I assume is much newer than DNS), maybe it t...

1
голосов
5ответов
5437 просмотров

Listening a socket on client machine using Javascript

Is that possible? I'm writing a web-admin interface for a network-system. I need to listen to a specific UDP port and show it in browser. Can I do that in javascript? Also; any other ideas are welcomed. early-edit: Here's another idea: I have php and perl support at server-side. JS can call a p...

0
голосов
3ответов
2911 просмотров

How can I access UDP ports using a web application on the client PC?

One of the thing that current Windows application does is that it writes out information to a hardware device via a UDP message. We are considering porting the application to web-based. I checked Silverlight, and that doesn't allow UDP. We don't want to use ActiveX or Java Applets. What are the...

1
голосов
3ответов
600 просмотров

Type of object from udp buffer in python using metaclasses/reflection

Is it possible to extract type of object or class name from message received on a udp socket in python using metaclasses/reflection ? The scenario is like this: Receive udp buffer on a socket. The UDP buffer is a serialized binary string(a message). But the type of message is not known at thi...

0
голосов
2ответов
777 просмотров

How to split data into equal size packets having variable header size..

I am building peer to peer application in python. Its going to work over UDP. I have function called getHeader(packetNo,totalPackets) which returns me the header for that packet.Depending on size of header I am chopping data, attaching data to header and getting same packet size. Header size is ...

24
голосов
3ответов
83239 просмотров

UDP checksum calculation

The UDP header struct defined at /usr/include/netinet/udp.h is as follows struct udphdr { u_int16_t source; u_int16_t dest; u_int16_t len; u_int16_t check; }; What value is stored in the check field of the header? How to verify if the checksum is correct? I meant on what data is the ch...

3
голосов
2ответов
2132 просмотров

C# UDP multicast sockets - how to handle link failures

I'm working on a UDP Multicast library and got a question on how to properly handle link failures, disconnected/reconnected NIC cables, etc. In my test I have the following setup: 2 servers sA and sB sA is sending UDP multicast data and sB is receiving multicast data servers are connected thro...

1
голосов
1ответов
2540 просмотров

Send udp packet on LAN from web browser

I have built a simple TAPI app that will run on a machine on the LAN that connects to the office PBX, it allows me to receive dial, answer, hangup etc commands (which I was planning on receiving via a udp packet). I did this with the intention to integrate the office CRM system to the phone syste...

34
голосов
2ответов
79912 просмотров

Best C++ RTP/RTSP library

I'm looking for a RTP/RTSP library in C++. I found pjsip but it is more C-style. I'm looking for more OO library.

0
голосов
2ответов
759 просмотров

c# UDP check if i got the whole packet?

Well this is my first udp test program and i think i now understand a bit of it :) any way here is my code so far: static void Main(string[] args) { Socket udpSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); udpSocket.Bind(new I...

1
голосов
2ответов
2907 просмотров

How to send/receive nmea string over tcpip/udp

I have a gps receiver, which can send data (using gprs connection) to the server www.example.com. Now I need something to receive this data (gps nmea string) from www.example.com (probably, to listen to certain port..), parse this information and store it to my database. I have some knowledge o...

4
голосов
2ответов
1963 просмотров

UDP broadcasts are not being received by sender

Platform: Windows 2003 R2, C# I have an application that sends UDP messages to other instances of itself, running on the same computer and on other computers. This is working fine. But, on some computers, the listener cannot hear messages that other thread/process on the same computer has tran...

0
голосов
1ответов
887 просмотров

GetExtendedUdpTable and Remote Ip Address

I've got some c# code that is mapping processes to ip addresses, I'm basically trying to write some software that will look at a process and give me the ip address so that I can write a monitor that will allow friends to find be in games. When running my application though it detects that a game...

1
голосов
1ответов
380 просмотров

UDP request from a Windows Gadget

How can I make a UDP request from a Windows Gadget? This gadget is very, very similar to what I want to make, but I'd like to make a gadget that gets game information from TF2 servers by making a UDP request. I took a look at the code for the afrementioned gadget and I really couldn't make heads ...

0
голосов
2ответов
1109 просмотров

Qt4 DNS Server using QUdpSocket

I am writing a DNS server for an application I'm working on and I'm running into some difficulties. I want to bind to port 53 on localhost and listen for DNS lookup requests, then send back the response. Unfortunately, when I call QUdpSocket::bind() the resulting socket is not writeable. Is th...

1
голосов
3ответов
2074 просмотров

How to process UDP data in Appengine

I have a service provider who is transmitting data thro' UDP. I want to establish a connection to them, receive & process data (will be with in the 30 sec limit/request) Is it possible to get & process UDP data in appengine. I am looking for some simple example.

2
голосов
2ответов
1669 просмотров

efficient and flexible binary data parsing

I have an external device that spits out UDP packets of binary data and software running on an embedded system that needs to read this data stream, parse it and do somethign useful. The binary data gets logged to a file as well. I would like to write a parser that can easily take the input dire...

2
голосов
1ответов
1628 просмотров

C# UDP Multicast disconnects after a few seconds

I have some networking code which connects to a multicast address but disconnects after a few seconds. Can anyone figure out what's wrong with this code? String Target_IP = "224.1.2.3"; int Target_Port = 31337; IPEndPoint LocalEP = new IPEndPoint(IPAddress.Any, Target_Port); IPEndPoint RemoteE...

3
голосов
4ответов
5564 просмотров

How to listen UDP and make use of PHP

I have to build up a system which listens for requests from a GPS device which is only capable of sending UDP requests. Then I am going to analyze requests hopefully by PHP if it is possible. I do not know where to start. What do I need? Can I make use of PHP? Would it be reliable to use PHP? C...

0
голосов
5ответов
4116 просмотров

Why am I not receiving UDP Packets sent to my own IP?

I've written this ruby program to send a UDP Packet to port 16800: require 'socket' sock = UDPSocket.new sock.bind("", 47123) sock.send("Hello!", 0, "192.168.0.100", 16800) sock.close where 192.168.0.100 is my own ip address. However, the packet doesn't show in Wireshark and my UDP server lis...