Hi, first of all, I'm just a hobbyist, so I'm sorry if this is dumb question or if I'm being too naive. (It also means that I can't buy expensive libraries)
This is the situation: I'm building a simple voice chat application in C#.NET (something like Ventrilo or TeamSpeak but only for about 15 or 20 people, and running on 100Mbps LAN). ...
I don't have much experience doing unit testing. From what I learned, code should be decoupled, and I should not strive to test private code, just public methods, setters, etc etc.
Now, I have grasped some basic testing concepts, but I have troubles applying more advanced stuff to this case... Dependency Injection, Inversion of Control,...
I'm using the DatagramSocket class in Java to receive udp packets from a client written in C. Here is the code that receives (the server socket is already set up):
byte[] inputByte = new byte[1];
DatagramPacket recvdPacket = new DatagramPacket(inputByte, inputByte.length);
try {
serverSocket.receive(recvd...
is it possible to send multiple tcp or udp packets on a single ip packet? are there any specifications in the protocol that do not allow this.
if it is allowed by the protocol but is generally not done by tcp/udp implementations could you point me to the relevant portion in the linux source code that proves this.
are there any implemen...
hi, i've been doing a lot of reading on blocking vs non-blocking sockets for udp, but am having a hard time understanding the merits of one over the other. the overwhelming majority of comments on the internet seem to indicate that non-blocking is better, but aren't very specific as to what scenarios they would be better in and i've foun...
Hi there,
I have a problem in understanding what recv()/recvfrom() return from an non-blockig UDP socket.
A bit more specific and compared to TCP (please correct me if I'm wrong):
A blocking socket (either TCP or UDP) won't return from a recv() until there is some data in the buffer. This could be some number of bytes (TCP) or a comp...
I'm writing a PTPv2 implementation in Matlab using the Java interface, because the udp command in Matlab doesn't do multicast packets for the sync. I have the socket set up and I can receive packets just fine, but when I'm viewing the conversations in Wireshark, I'm broadcasting to a different multicast group than the one I gave the ord...
Is there something like twisted (python) or eventmachine (ruby) in .net land?
Do I even need this abstraction? I am listening to a single IO device that will be sending me events for three or four analog sensors attached to it. What are the risks of simply using a looped UdpClient? I can't miss any events, but will the ip stack handle t...
How to get the length of received UDP packet? Using wireshark I could see the correct length of datagram. How can I print this value in my simple udp server program? I am receiving binary data (Non printable ascii characters as a data) So I can not use strlen(buf) which throws incorrect length.
if (ret=recvfrom(s, buf, BUFLEN, 0, ...
Hi all,
I've developed an application for Windows that use wxPython and twisted.
The issue is that if I run the app using the Python interpreter everything is OK (I could receive and transmit UDP packets).
If I build a py2exe app I can only receive UDP packets. I have no error, the app is responsive but tx packets are not transmitted ...
I'm trying to write a BOOTP server in c#.
I'm receiving and parsing the BOOTP packet from the client and I need to reply with my server IP address.
The problem is:
The computer can have multiple network adapters
The client doesn't yet have an IP address
Is there any way to find out what adapter the UDP packet was received on?
...
I have a UDP socket that is opened for output only. Here are the pertinent calls (I left out the error handling to make it easier to read):
rc = WSAStartup(MAKEWORD(2, 2), &wsd);
so = WSASocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP, 0, 0, 0);
sendto(so, buf, bufLen, 0, (SOCKADDR *) &dest, sizeof(dest));
This socket is only written to. O...
Wireshark captures UDP packets in my LAN with follwoing details
Source IP 192.168.1.2
Destination IP 233.x.x.x
Source Port 24098
Destination Port 12074,12330
how can i capture it in c#?
...
I would like to find out if Twisted imposes restriction on maximum size of UDP packets. The allowable limit on linux platforms is upto 64k (although I intend to send packets of about 10k bytes consisting of JPEG images) but I am not able to send more than approx. 2500 bytes
...
I think my question is "no comment", and I must say is is not a bot-net.it is for education.
please tell me if this kind of question (hacking related) is not allowed in stackoverflow.
Edit:
While(Countries::C_Iran::LastMessage::Nuclear>0.05)IAEA::GetCountryA(Countries::C_Iran::Handle)->Boycott++;
if(IAEA::GetCountryA(Countries::C_Ira...
I have a java app on linux which opens UDP socket and waits for messages.
After couple of hours under heavy load, there is a packet loss, i.e. the packets are received by kernel but not by my app (we see the lost packets in sniffer, we see UDP packets lost in netstat, we don't see those packets in our app logs).
We tried enlarging sock...
I made a function to send an UDP packet to a server and to get the returned packets.
When i make a single recvfrom call it works, but i need to get all potential packets from the server within the defined timeout.
Here's my code: http://pastebin.be/23548
Can someone help me?
Thanks.
...
How to flush Input Buffer (if such thing exists at all) of an UDP Socket in C ?
I'm working on an embedded Linux environment and using C to create some native application. There are several of these embedded machines on the same network, and when an event occurs on one of them (lets call it the WHISTLE-BLOWER), WHISTLE-BLOWER should sen...
Why is the design of TCP servers mostly such that whenever it accepts a connection, a new process is invoked to handle it . But, why in the case of UDP servers, mostly there is only a single process that handles all client requests ?
...
On iPhone, I am running an app with AsyncUdpSocket library to take care of UDP networking. I have tested it. I can send UDP packet from my iPhone to a server that runs Java program accepting UDP correctly.
However, when it is the other way around, Java program's UDP message doesn't get through to iPhone. So I decided to test the library...