sockets

Adobe Air sockets and SSL

Hi all! I'm writing an Air application which uses sockets. I need to connect to nexus.passport.com:443 using SSL. Is this possible? If so, how? I use JavaScript for the programming. Thanks in advance. ...

method to find my UDP socket's "real" port?

Is there any free service to which I could send a UDP packet and it would respond telling me what is my "real" UDP port? (my application is behind a NAT) This kind of service could allow me to make a p2p coordination server with normal php hosting. The p2p clients would know their UDP ports from this service They will then contact my ...

writing a multiplexing server in clojure?

I would like to write a simple multiplexing server in Clojure (as a sample project to learn the language) but I am having a very hard time finding resources to aid me in this on the web. does anyone have any resources that can point to the basics of socket programming in Clojure and the best way to go about writing such a server? ...

How do I open a TCP socket from SilverLight?

I need to know how to open a TCP socket connection from Silverlight. How is it done? ...

Mail problem with Hungarian characters

Hi, I have a multipart mail which is processed using async read on sockets. The problem is that instead of hungarian diacritics is displayed something like =ED which is the code in hexa of character. I suppose that is some encoding pb. I've tried several encoding from iso-8859-2 to utf7. This is a part from mail header: X-MS-Has-Attac...

Hunt down java.net.SocketException: No buffer space available

Hi I have very ugly problem with: java.net.SocketException: No buffer space available (maximum connections reached?) It is client-server app. Client is Windows XP SP2 32b, with two net cards core duo. Java 1.6. u7. Application have couple server socket open for local communication and couple of client socket for rmi to jboss server. ...

'Who's online?' Ruby Network Program

I have several embedded linux systems that I want to write a 'Who's Online?' network service in Ruby. Below is related part of my code: mySocket = UDPSocket.new mySocket.bind("<broadcast>", 50050) loop do begin text, sender = mySocket.recvfrom(1024) puts text if text =~ /KNOCK KNOCK/ then begin sock = UD...

HTML 5 with CSS 3 and HTML 5 sokets

Does any body know where to get the tutorials for this? Because I have searched in the google and I could not find proper source. Thanks in advance! ...

How do I open a connection back to the server using Flex?

Hi, I want to open a connection back to the server using Flex so I can stream chat messages to the Flex front-end. How do I do this and does Flex enforce any same-origin restrictions on ports or subdomains? ...

How can I send an HTTPS request in Perl without LWP::UserAgent or HTTP::Request?

Hi, I need to send an HTTPS request without using LWP::UserAgent or HTTP::request? What is another method of doing so? This is the request I need to send: POST https://payflowpro.paypal.com/ Connection: close Host: payflowpro.paypal.com Content-Length: 181 Content-Type: text/namevalue X-VPS-CLIENT-TIMEOUT: 30 X-VPS-REQUEST-ID: 124940351...

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 *)&...

Java: How can I get the connected port from an InetAddress?

I'm trying to build a Java NIO-based socket server using Apache Mina. I really need to know the port of the remote host, not just the IP address, and it seems that Mina only exposes a SocketAddress (which can be downcast to InetAddress) object. I can get the IP address from InetAddress, but I normally use Socket.getPort() to get the po...

N:1 file descriptors???

Is it possible to have N file descriptors be seen to a program as 1 file descriptor such that data received on any of the N file descriptors (ie from N sockets) will be forwarded back to the calling API on the single file descriptor, hiding the fact that it may actually be coming from a different file descriptor? Is it also possible to h...

.net async socket timeout check thread-safety

http://msdn.microsoft.com/en-us/library/system.net.sockets.socketasynceventargs.aspx Starting with the above msdn example I'm trying to write a timeout check which will close inactive client sockets and free up resources. This is what I have come up with. But I'm not sure if its completely thread-safe and if there is a better way to do...

PostgreSQL socket connection

Is it possible to send data on a socket over a TCP?IP connection from a PostgreSQL stored procedure or trigger? If you know of any useful examples pleas tell me. If you know of something similar for other data base systems it would also be helpful. Thanks in advance. ...

Sockets & File Descriptor Reuse (or lack thereof)

Hi, I am getting the error "Too many open files" after the call to socket in the server code below. This code is called repeatedly, and it only occurs just after server_SD gets the value 1022. so i am assuming that i am hitting the limit of 1024 as proscribed by "ulimit -n". What i don't understand is that i am closing the Socket, whic...

Redirecting VxWorks shell output to a socket.

I'm aware that it's straightforward to redirect the shell output to a file. So I should also be able to set up a socket and redirect the shell's output to the socket, as essentially it's just another file descriptor (I think)? I've seen some example C programs that create some basic client/server functionality but (as small as they are...

Sockets, Get Number of Bytes Available (c#)

Good afternoon, OK, short and sweet. I need to get the number of bytes available for read from a socket. I have setup a NetworkStream on my Socket Client but can't seem to find how to get the number of bytes that are available to be read, at the moment I can only get a boolean stating "Yes I have Bytes", or "No Bytes this time". But th...

In Twisted Python - Make sure a protocol instance would be completely deallocated

Hey, I have a pretty intensive chat socket server written in Twisted Python, I start it using internet.TCPServer with a factory and that factory references to a protocol object that handles all communications with the client. How should I make sure a protocol instance completely destroys itself once a client has disconnected? I've got...

C++ Socket Server - Unable to saturate CPU

I've developed a mini HTTP server in C++, using boost::asio, and now I'm load testing it with multiple clients and I've been unable to get close to saturating the CPU. I'm running on a 4-cpu box, and getting about 50% usage of one cpu, 20% of another, and the remaining two are idle (according to htop). Details: The server fires up on...