sendto

UDP Response

Hi UDP doesnot sends any ack back, but will it send any response? I have set up client server UDP program. If I give client to send data to non existent server then will client receive any response? My assumption is as; Client -->Broadcast server address (ARP) Server --> Reply to client with its mac address(ARP) Client sends data to ...

Explore.exe Address Bar "Shell:" Command in Windows 7

With Windows 7 was just trying to navigate to c:\users\scott.cate\sendto to modify the [send to] context menu and I was getting access denied. With a little search engine work I found this trick. Open Windows Explorer (Win+E Shortcut) and type Shell:sendto into the addres bar and press enter. Windows Explorer opens up to C:\Use...

Help with Sending/ Receiving UDP packets - C Sockets

Ok, if you look at some of my previous questions, I've been working on getting a simple connection up and running with C sockets (I'm still fairly new to the whole networking aspect of an program, but everyone has to start somewhere, right?). I've included the code below that I have so far and when I execute it, I get no errors, but at t...

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 *hp; hp=gethostbyname("www.google.com"); sendto(sockDes,&hp,sizeof(hp),0,(struct sockaddr *)&...

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

Hi all, 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 several months, but today the Mac decided to stop routing the multicast packets...

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

Hi! 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 = '192.168.0.1' udp = socket(AF_INET,SOCK_DGRAM) udp.sendto(data, (hostname, port)) ...

Is there a technique to determine if a dos app was invoked via sentto vs a dos window?

In the case of a sendto invocation, I would like to keep the application open, after it completes, so the user can look at it. In the case of a dos window invocation, the user controls when the window closes. The platform is XP using msvc 6 ...

Passing a structure through Sockets in C

Hi I am trying to pass whole structure from client to server or vice-versa. Let us assume my structure as follows struct temp { int a; char b; } I am using sendto and sending the address of the structure variable and receiving it on the other side using the recvfrom function. But I am not able to get the original data sent on the...

C windows sendto()

I am trying to send over UDP using the following code, but i'm getting strange results. if((sendto(newSocket, sendBuf, totalLength, 0, (SOCKADDR *)&sendAddr, sizeof(sendAddr)) == bytesSent) < 0) { printf("Send error! - %d\n", WSAGetLastError()); } However say when the totalLength variable is set to 30 the sendto functio...

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 ([email protected]) //Commented and modified by Vishal Kotcherlakota (PID A07124450) #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <string.h> #i...

Windows UDP sendto returns WSAEINTR

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...

Multiple sendto() using UDP socket

Hi, 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 to split my messages into small data chunks. So far, it worked well but I now encoun...

SendTo menu and single instance program.

Hello. I'm making a program through which I will be able to send files to an FTP server just by right clicking "SendTo". The problem is that every time I click "SendTo" it opens a new exe file and it works as a separate program. I need to make it somehow to send the file with the already open program. Thank you. ...

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 Menu. This way when someone right clicks on a file, my application will show in the Send T...

C sendto returns -1 if broadcasting on a vpn

I have built a udp server that broadcasts a message every so often. It broadcasts without a problem. But if I turn on my vpn, then sendto will start returning -1 even though I am sending to INADDR_BROADCAST. I am running this on a mac btw if that changes anything. I really have no idea why this would happen, I am really wondering how ...

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). What I'm experiencing is after the connection is up for about 20 minutes, it starts to deteri...

When will one socket suffice, when do I need to create more?

The "connectionless" aspect of UDP has thrown me for a loop... If I setup a UDP socket set to INADDR_ANY, then bind that to port 33445 on the local machine, the machine will accept incoming connections from various clients. All of these connections will be serviced by that one socket, since this is not TCP and I cannot spawning a new c...

How to Send a structure using sendto()

I have created structure : struct buffer { string ProjectName ; string ProjectID ; } buffer buf; buf.ProjectID = "212"; buf.ProjectName = "MyProj"; Now to send this structure using sendto method , I am typecasting the strucure and sending it back as below: char *sendbuf = (char*)&buf; sentbytes = sendto(sock,sendbuf,strlen(s...

raw socket sendto failed using C on Linux

I'm trying to send a raw packet using UDP, with the IP and UDP headers that I have constructed in my code. Raw packet successfully initialized with socket(PF_INET, SOCK_RAW, IPPROTO_UDP) and socket option set using setsockopt(sd, IPPROTO_IP, IP_HDRINCL, val, sizeof(int)). The problem is when I send the packet using sendto(), I get the e...

sendto not working on VxWorks

I asked this question before and had no resolution (still having the problem). I am stumped because the function returned without error and NO DATA was sent! This code works on Linux ... the VxWorks version does not work (sendto does not send, though it returns without an ERROR). The synopsis - I am writing a simple echo server - The se...