sockets

Can two different UDP socket in a system bind same port?

I have an application which uses UDP connection, now when i try to run the app more than once its throwing me an exception java.net.BindException: Address already in use: Cannot bind but in my another app, which uses tcp connection, i can open two instance of the same app and its working fine. why this error only with UDP connection? ...

Socket Performance C++ Or C#

I have to write an application that is essentially a proxy server to handle all HTTP and HTTPS requests from our server (web browsing, etc). I know very little C++ and am very comfortable writing the application features in C#. I have experimented with the proxy from Mentalis (C# socket proxy) which seems to work fine for small webpages...

Sending information down a socket in C#

I have built two programs in C# and I am sending simple strings through the sockets. This is fine for the moment but in the near future I will need to send more complicated items, such as objects down the sockets and eventually files. What steps would I take to do this? What purpose do the buffers serve for the sockets/streams? Apolo...

Increase the TCP receive window for a specific socket

Hi, How to increase the TCP receive window for a specific socket? - I know how to do so for all the sockets by setting the registry key TcpWindowSize, but how do do that for a specific one? According to MSFT's documents, the way is Calling the Windows Sockets function setsockopt, which sets the receive window on a per-socket ...

Sockets with Silverlight 4

I need to implement a persistent socket connection from my in-browser Silverlight 4 app to a device on the network. I need the following: Connect to it and keep a persistent connection Send and Receive data Get some type of event or notification (or detect it) when the connection drops. Is this possible with Silverlight 4? If so,...

How do I detect server status in a port scanner java implementation

I am writing a port scanner in Java and I want to be able to distinct the following 4 use cases: port is open port is open and server banner was read port is closed server is not live I have the following code: InetAddress address = InetAddress.getByName("google.com"); int[] ports = new int[]{21, 22, 23, 80, 443}; for (i...

Java based HTTP Client which supports Pipelining

Do you know of any free Java library which support the HTTP pipelining option of HTTP/1.1 ( http://en.wikipedia.org/wiki/HTTP_pipelining ) ? ...

python httplib and broken tcp connection

How do I find out if a connection has been broken using the httplib library? Seems like something so basic yet I can't find the answer on here or google. ...

If I read/write to a TCP socket that is on localhost, will that avoid firewalls?

If I want to open a TCP socket between 2 processes on the same computer, will having the server run on localhost and the client connect on localhost be safe from any firewall intervention? ...

"Best" language /architecture for browser-based app with ODBC and sockets? (subjective)

Sorry to ask a subjective question, but I would welcome some advice. I am an experienced programmer of embedded s/w, but haven't done much network programming, although I have done a fair bit of hobbyist PHP. Anyway, I have to develop what is probably a fairly general type of app, as shown in this crude diagram -----------------------...

socket.error: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions

Hello all. I'm trying to create a custom TCP stack using Python 2.6.5 on Windows 7 to serve valid http page requests on port 80 locally. But, I've run into a snag with what seems like Windows 7 tightened up security. This code worked on Vista. Here's my sample code: import SocketServer import struct class MyTCPHandler(SocketServer....

PHP Sockets Errors (connection refused and No such file or directory)

Hello all, I am writing a server app (broadcaster) and a client (relayer). Several relayers can connect to the broadcaster at the same time, send information and the broadcaster will redirect the message to a matching relayer (for example relayer1 sends to broadcaster who sends to relayer43, relayer2 -> broadcaster -> relayer73...) ...

Does BeginReceive() get everything sent by BeginSend()?

I'm writing a program that will have both a server side and a client side, and the client side will connect to a server hosted by the same program (but by another instance of it, and usually on another machine). So basically, I have control over both aspects of the protocol. I am using BeginReceive() and BeginSend() on both sides to sen...

How efficient BSD sockets to writew server client application on iphone?

Hi, I am creating server-client application for iPhone. I want to communicate between two application in same network. For this functionality i am planning to use sockets. How much efficient BSD sockets to use with iphone?? Is there any option available to implement same functionality? Thanks, Jim. ...

SocketException preventing use of C# TCPListener in Windows Service

I have a Windows Service that does the following when started. When running via a Console application it works fine, but once I put in a Windows Service I get the below exception. Here is what I have tried so far: Disabled the firewall, also tried adding explicit exclusions for the exe, port, and protocol Checked CAS Policy Config, sho...

Using read() directly into a C++ std:vector

I'm wrapping up user space linux socket functionality in some C++ for an embedded system (yes, this is probably reinventing the wheel again). I want to offer a read and write implementation using a vector. Doing the write is pretty easy, I can just pass &myvec[0] and avoid unnecessary copying. I'd like to do the same and read directly ...

How does one programmatically download files from the web?

How are files downloaded from servers in programming languages like C? I understand higher level languages have magic functions like "download_file_from_url()" but they don't help me understand what is actually going on. I'm a little familiar with sockets but network programming in general is still a black box to me. Thanks for any help....

sendto: Network unreachable

Hello. I have two machines I'm testing my code on, one works fine, the other I'm having some problems and I don't know why it is. I'm using an object (C++) for the networking part of my project. On the server side, I do this: (error checking removed for clarity) res = getaddrinfo(NULL, port, &hints, &server)) < 0 for(p=ser...

In Perl, given two IO::Socket's how do I connect 1st socket's input to 2nd's output and vice versa?

Suppose I have made two connections in Perl with the help of IO::Socket. The first has socket $s1 and the second has socket $s2. Any ideas how can I connect them together so that whatever gets received from $s1 got sent to $s2 and whatever gets received from $s2 got sent to $s1? I can't understand how to do it. I don't know how to conn...

Problem in transfering file from server to client using C sockets

I want to ask, why I cannot transfer file from server to client? When I start to send the file from server, the client side program will have problem. So, I spend some times to check the code, But I still cannot find out the problem Can anyone point out the problem for me? CLIENTFILE.C #include stdio.h #include stdlib.h #include time...