Questions tagged [sendto]

sendto() is a system call used to transmit a message to another socket.

sendto() is a system call used to transmit a message to another socket. It is used on a connection-mode socket.

Reference:

217 questions
4
votes
7 answers

Multiple sendto() using UDP socket

I have a network software which uses UDP to communicate with other instances of the same program. For different reasons, I must use UDP here. I recently had problems sending huge ammounts of data over UDP and had to implement a fragmentation system…
ereOn
  • 53,676
  • 39
  • 161
  • 238
4
votes
2 answers

When acting on a UDP socket, what can cause sendto() to send fewer bytes than requested?

When acting on a UDP socket, what can cause sendto() to send fewer bytes than requested? The motivation for asking this is to figure out the precautions I need to take to ensure I always get a complete message sent in a single call to sendto(), and…
duncan
  • 2,323
  • 3
  • 17
  • 21
4
votes
1 answer

In which case does sendto() on UDP socket return 0?

Is there a case, when calling of sendto() on UDP socket returns 0 and if yes, what does it mean? Manual only says, that on error it's -1, otherwise it's number of bytes sent.
Youda008
  • 1,788
  • 1
  • 17
  • 35
4
votes
2 answers

Python sendto() not working on 3.1 (works on 2.6)

For some reason, the following seems to work perfectly on my ubuntu machine running python 2.6 and returns an error on my windows xp box running python 3.1 from socket import socket, AF_INET, SOCK_DGRAM data = 'UDP Test Data' port = 12345 hostname =…
mozami
  • 7,391
  • 4
  • 21
  • 20
4
votes
2 answers

Link-scope IPv6 Multicast packets suddenly not routable on a MacBook Pro?

This is a slightly obscure question, but I'm stumped and I thought maybe somebody out there might have more of a clue on the issue. My co-worker has been successfully running an in-house application that uses IPv6 multicasting on his MacBook Pro for…
Jeremy Friesner
  • 70,199
  • 15
  • 131
  • 234
3
votes
2 answers

Socket - Permission denied in C

I'm trying to get an MX record from an DNS server in C. My problem is, that everytime I call sendto or recvfrom I get a Permission denied error. (IDE - Xcode 4, Mac OS X Lion) Haven't really done anything in C up to this point but I need this for an…
Patrick
  • 45
  • 1
  • 1
  • 7
3
votes
1 answer

How to generate constant UDP traffic?

I need to write a UDP client in C that generates traffic that will have a sending rate of Ron for a time of Ton and stop sending anything for a time Toff and repeat again. So, the cross traffic is periodic. The problem that I am having is how to…
mirandaio
  • 275
  • 1
  • 2
  • 10
3
votes
2 answers

Formal Parameters difference between sendto() and recvfrom() in C

I am using recvfrom() and sendto() for receiving and sending UDP packets. I have noticed that recvfrom() as last parameter requires a pointer to the variable storing the length of server address while sendto() requires the variable that stores the…
3
votes
5 answers

What causes udp reception delay?

I have noticed that when I am sending packets at even intervals from a udp socket, the first packet sent seems to be delayed. For example, if I am sending the packets every 100 ms, I find the delay between receiving the packets to be normally…
Benubird
  • 18,551
  • 27
  • 90
  • 141
3
votes
2 answers

Accepting File Argument in Python (from Send To context menu)

I'm going to start of by noting that I have next to no python experience. alt text http://www.aquate.us/u/9986423875612301299.jpg As you may know, by simply dropping a shortcut in the Send To folder on your Windows PC, you can allow a program to…
Salty
  • 6,688
  • 3
  • 33
  • 31
3
votes
2 answers

Python - Is sendto()'s return value useless?

In my recent project, I need to use the UDP protocol to transmit data. If I send data by using size = s.sendto(data, (, )), will the UDP protocol ensure that the data is packed into one UDP packet? If so, will size == len(data) always be…
YON
  • 1,607
  • 3
  • 18
  • 33
3
votes
2 answers

Combining sento() write writev()?

I've set a udp socket and call sendto() with a different recipient at each call. I would like to use writev() in order to benefit scater/gather io but writev() does not allows me to specify the recipient addr/port as in sendto(). Any suggestions?
yves Baumes
  • 8,836
  • 7
  • 45
  • 74
3
votes
2 answers

what exactly is passed as "address" in sendto for ipv6

I am trying to send an icmpv6 ping packet across running as root (python 2.7 on Linux) I understand that sendto uses two tuple struct in case of ipv4 (and it works) and know that ipv6 uses a 4 tuple struct. Still i can't get it to work. It either…
fkl
  • 5,412
  • 4
  • 28
  • 68
3
votes
1 answer

How can I make my Windows Forms program execute any of the SendTo shortcuts

I want to be able to show the SendTo menu on a file list inside my program and then execute the SendTo shortcut or droptarget on the chosen file. It seems I can ShellExecute a .lnk file, but I need to know how to simulate dropping a specified file…
Chris Love
  • 120
  • 4
3
votes
6 answers

Sending structure using recvfrom() and sendto()

I am using C language which is a common platform for both the server and the client. I have a structure of a particular type which I want to send to the client from the server. For e.g. SERVER CODE //necessary declarations struct hostent…
Biswajyoti Das
  • 7,881
  • 11
  • 34
  • 26
1
2
3
14 15