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
2
votes
1 answer

Catching unhanded exceptions in a DLL

I am writing C++ socket code using Visual Studio Express 2013 in a .dll project. I am at the point where I am getting an error at this sendto function: /* Send data back */ if (sendto(sd, (const char…
ecain
  • 1,282
  • 5
  • 23
  • 54
2
votes
4 answers

SendToAsync memory leak?

I have a simple .net 3.5sp1 windows application (in C#) that acts as a UDP server. It listens on a port, receives data from an endpoint, and then retransmits what it receives to another endpoint (i.e. a relay, for a live broadcast data stream). …
Rodney Burton
  • 427
  • 8
  • 18
2
votes
1 answer

Linux sendto implementation possibly adding extra padding to UDP message

I have recently written a C program using Windows/Winsock2, in which a string is to be transmitted via UDP. The following code produces expected and correct results: static const char *network_config_init = "HF-A11ASSISTHREAD"; void…
Doug Barr
  • 29
  • 3
2
votes
1 answer

VS 2008 created shortcut doesn't show up in "Send To" menu

I have a WinForms application built using Visual Studio 2008. I added a Setup Project to the solution to create an installation MSI file. I need the setup project to create a shortcut pointing to the application's executable in the users Send To…
Brettski
  • 19,351
  • 15
  • 74
  • 97
2
votes
1 answer

How to interpret sendto Unix socket message?

I have a process fall into infinite loop of keep calling sendto function. I can see the parameters of sendto by strace that process, but I don't know how to read the socket message. Any hint for interpreting this message? sendto(10,…
boyang
  • 667
  • 1
  • 8
  • 22
2
votes
1 answer

C - How to send char array of bytes over UDP that contain multiple 0 bytes?

I've been trying to send a custom frame over UDP using the sendto() commands to another PC. Works fine but as soon as there is a 0 byte in the array it will (ofcourse) recognize it as a \0 value and stop at that byte. How do can I bypass this to…
rakanishu
  • 25
  • 1
  • 3
2
votes
1 answer

Change Source IP in socket sendto()

My function currently works correctly, however It's sending from my servers main IP address instead of another one. Here is the snippet of code: void *sendpacket(void *par1) { running_threads++; int thread_id = (int)par1; …
user1372896
  • 542
  • 1
  • 10
  • 27
2
votes
1 answer

Invoking sendto() with wrong length

ssize_t sendto(int socket, const void *message, size_t length, int flags, const struct sockaddr *dest_addr, socklen_t dest_len); In the above sendto() synopsis, 3rd field represents length which is ideally be the size of message being sent in bytes.…
Sunil Bojanapally
  • 12,528
  • 4
  • 33
  • 46
2
votes
1 answer

UDP socket (DGRAM) bind/sendto error

I'm new to UDP sockets, I have worked with TCP before. It seems my client can't connect to my server, but I don't know where is the problem. When I run my server, it looks all is working fine. Compiles and runs without a problem and waits for the…
2
votes
1 answer

C++ UDP sendto fails, needs sleep

I have a UDP client C++ code - based on WSA sockets - that works well. The code was originally written in VS6 and I recently recompiled it in VS2010 for 64bit environment, with only little adjustments. Now, the sendto() fails to send something, if…
user3677092
  • 31
  • 1
  • 4
2
votes
2 answers

Sockets sendto() returning EINVAL

I'm trying to send a UDP packet in C. I have the following sendto(): char* msg = "Hello"; //ret is the return value of getaddrinfo, the address is AF_INET (IPv4) //and the sock_type is SOCK_DGRAM (UDP) struct sockaddr_in *ip = (struct sockaddr_in…
Hugo
  • 2,186
  • 8
  • 28
  • 44
2
votes
1 answer

struct sockaddr.sa_data appears to be too small

I am doing some interposition in Mac OS X (essentially intercepting C calls) and I noticed that the ping application tries to call the sendto function with an addrlen value of 16. In sys/socket.h I can see clearly that the sa_data array only holds…
Tim Mattison
  • 152
  • 10
2
votes
1 answer

Chat simulator in Python not working as expected

What I am trying to do is basically simulate a client-server-client chat using threads. Here is the code so far: from socket import * from threading import Thread import threading import time from random import randint clients = [] HOST =…
2
votes
2 answers

android send intent to specific contact (whatsapp, sms, hike, etc.)

I have implemented an app in which I can pick a contact and list some custom information about this contact in a tablelayout. In each row of this tablelayout I have a column (button) which should send a message to the specific user using sms,…
user2477504
  • 73
  • 1
  • 3
  • 6
2
votes
1 answer

7zip SFX Batch For SendTo Folder

7z a -mx9 -sfx %1.exe %1 This is what i have so far as a batch file, which if i drag and drop a file or folder onto the batch file i get a 7zip SFX on Ultra Compression under the same name as the original file. but this only works if the file is…
Chumbawamba
  • 121
  • 2
  • 11