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
1
vote
1 answer

windows, c++: send file to exe (c++ solution) and read data from sent file

My goal is to send an arbitrary text file to a exe which is a build of a c++ project. In the c++ project I would like to read the file which was sent to the exe. Hence, I think I need to pass the path of the sent file to the application (exe). My…
david-
  • 25
  • 4
1
vote
1 answer

On click of send to mail recipient call a c# function and get the file or folder on which it is clicked

In C# .net (desktop application). Now on the right click of the folder or file - after clicking on "send to" -> "mail recipient", I want to open my application. I can do this using dll, I want to make dll in c#. here is snap shot that I want to do -…
Ujjaval Moradiya
  • 222
  • 1
  • 12
1
vote
0 answers

Message with phone number and sms_body via whatsapp android

I have this code to send message via whatsapp Uri uri = Uri.parse("smsto:" + PhoneNumber); Intent sendIntent = new Intent(Intent.ACTION_SENDTO, uri); sendIntent.setPackage("com.whatsapp"); sendIntent.putExtra("sms_body", "Some…
1
vote
0 answers

How can I send a text information to a servlet that creates a text file containing it?

I created an AJAX app that should send a text info to my tomcat server, and there I should have a servlet that in theory should get that text and save it in a file. I created an app that gets the content of a text area and transforms it into JSON…
Kyle
  • 1,568
  • 2
  • 20
  • 46
1
vote
2 answers

SendTo / Batch / 7zip

I am trying to create a SendTo shortcut to a batch script that will take the selected files (in this case, jpg's), zip them with 7zip and name them the folder name (that the selected files are in) and place them in the same folder. The directory…
Jordan
  • 29
  • 4
1
vote
1 answer

UDP Socket error 10049

I have a UDP server socket which can receive datagrams from clients, but is not able to send a reply back to any of them. This is the code I use to send the buffer: SOCKADDR_IN addr; memset((char*)&addr, 0, sizeof(addr)); const char* ip…
user3530012
  • 720
  • 2
  • 20
  • 37
1
vote
1 answer

Select multiple files, "send to" batch.cmd, let batch.cmd run a program on selected files

I am using a converter on many files. Usually I just do it one by one but that takes time. I want to be able to select multiple files with CTRL+Lclick, right click, send to a batch.cmd that then runs this code: "cmd /c dewssdos -P @file" @file…
Andrej S.
  • 13
  • 1
  • 5
1
vote
1 answer

Sending a structure in the sendto() function - C language

So I am trying to send a message to a client using the sendto() function. The sendto() function's prototype is this: ssize_t sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t…
umdcoder
  • 137
  • 1
  • 2
  • 15
1
vote
1 answer

Getting error 10049 (address not avai) on sendto() in UDP connection, but bind() worked

EDIT #2: The problem was I stupidly had the memset parameter order backwards, so, I wasn't zero'ing out my structure and thus must have had some garbage values in some of the rarely used fields. Which presumably explains why it initially worked on…
user3681853
  • 51
  • 2
  • 7
1
vote
2 answers

socket received less bytes than sent

i have many processes running, send messages to each other by socket. among them, there are two processes, the first one send 24 bytes to the other one(i'm sure it's 24 bytes because i get it from the return value of sendto()), but on the receiver…
user2810081
  • 589
  • 1
  • 8
  • 27
1
vote
1 answer

UDP "sendto" outside the local network

Hi I started programming UDP sockets recently and I've been using them for all kinds of stuff on a local network. but I cannot seem to find anything about how to send a UDP packet outside my lovely firewall. Here's the code i use for binding UDP…
1
vote
2 answers

C++ - Using sendto() with a basic string

My current code doesn't work I can't find a way to send the string with sendto() or convert the basic string to a char* so that it works. Thanks. Here is my current code: for (vector::iterator it=lines.begin(); it!=lines.end(); ++it){ if…
Mike Weber
  • 179
  • 1
  • 1
  • 10
1
vote
1 answer

sendto() crashes with error code "Success"

My problem is quite infuriating, actually. I'll show you the code first. /* ** listener.c -- a datagram sockets "server" demo */ //Original Code: Brian Hall (beej@beej.us) //Commented and modified by Vishal Kotcherlakota (PID A07124450) #include…
Vishal Kotcherlakota
  • 1,134
  • 4
  • 13
  • 36
1
vote
1 answer

Python UDP sendto() Ignoring Exception Block and Crashing

I have been trying to get a basic chat application working for months in python 2.7 (Using Geany IDE), and finally got a basic application working using UDP. I can connect and broadcast communications, but if a client connects and then closes later,…
Ben Schwabe
  • 1,283
  • 1
  • 21
  • 36
1
vote
2 answers

WinXP: sendto() failed with 10014 (WSAEFAULT) if destination address is const-qualified, IPv4-specific

It seems, I found a bug in Windows... Ok, let not be such pathetic one. I'm trying to do generic sendto() operation for UDP and occasionaly found that WinXP (32 bit, SP3, checked on real and virtual machines) returns "-1" bytes sent with…
Yury Schkatula
  • 5,291
  • 2
  • 18
  • 42