sockets

Simulate low speed connection on local network

Hi, Sometimes I want to manually test my web applications (either desktop applications calling web services or websites or RIA) to see how they behave with low speed internet connection (56 kbps for example). Is it possible to do it through network by simulating lower speed that the real one? If yes, is it also possible to simulate low ...

Using C#/C++, is it possible to limit network traffic?

I'm developing a parental monitoring/tracking application that has a feature to lock down all internet activity. While disabling the network adapter would seem like a simple solution, the application must have the ability to turn the internet back on remotely -- so the network needs to remain enabled, to a certain limit. Unfortunately,...

Flash receive sockets

I was searching on google for it, I couldn't find it. I would like to know how can I listen to sockets using actionscript 3 ...

Receive buffer size for tcp/ip sockets

What's the maximum data size one should expect in a receive operation? The data that has to be sent is very large, but at some point there will be packet fragmentation I guess? ...

java Socket or DatagramSocket for connecting to a NNTP server

Hay Guys, i want to write a simple NNTP client, which can connect to a server, send AUTHINFO details, and use GROUP and BODY to join a group and retreive posts. I had a discussion with a couple of guys in here and they suggested using dataGramSockets and datGramPackets. Could anyone provide a simple script to do these explaining how ea...

Connecting to a Multicast Server in Python

Hello This is my code for connecting to a multicast server, is this the best way of handling the exception. What I would like to do is to retry to connect if an exception occurs def initialiseMulticastTrackerComms(): try: sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.setsockopt(socket.IPPROTO_IP, socket.IP_MUL...

Redirecting TCP-traffic to a UNIX domain socket under Linux

Assume a legacy Linux application listening on a UNIX domain socket /tmp/foo. In addition to communicating with this legacy application over the UNIX domain socket mechanism I want to be able to connect to it via a TCP-connection on port say 1234. What is the easiest way to bind to TCP port 1234 and then redirect all incoming connectio...

Binary vs non-binary socketing java

I hear'd that exist binary communication. I'm beginner in java, I use plain text based which I learn from java.sun.com tutorials for sockets. So I want to know what benefits have binary socketing? Why I should use that? And what resources you can suggest about binary communication? ...

an EAR (JEE) application which listen to a socket request.

I want to build a JEE application (EAR) which not only provides web service(WAR) or direct JMS request (EJB), but I would like to also accept the socket request (e.g. UDP packet). I have tried writing a listener with java.net.DatagramSocket, letting it run as separate process, and redirecting the request to my EAR application. the ques...

java.net.SocketException: Connection Reset

I am running a client-server java code on my local machine n am connecting them using java sockets. I'm able to connect the client to the server and send a string of data, initially. When the server gets the data it also returns a string, initially. After that communication the whole thing just crashes. No response from both sides. I'...

Sockets Editor?

Currently I am developing an online game using sockets. I would like to know some way to debug whatever it send or receive. I remember when I played ragnarok, there was a program that detect the sockets that you receive and send, and you could edit them and send again. I would like to find a program like this, for debugging purporses o...

local vs remote socket connections on iphone

I want to send OSC messages from iphone to another programme (max/msp) by creating and connecting to a udp socket. this works from the iphone simulator, i.e. when both apps are running on the same computer but not when i install the app on the phone itself. I think the problem could be with specifying the IP of the remote computer. I am...

UDP chat server-client not able to communicate on diff machines

Hi, I have written a UDP client server chat, I am able to communicate to server if both server and client are on same machine, but i am not able to do so when client is on some other machine using diff ip address. Is there any special setting to achieve this? Regards, Tara ...

Check if client port is open and forwarded [C#, ASP.NET]

What is the best way to check if client has an open port, and if it's forwarded properly? The app works like this currently: Client creates a socket for incoming connections and wants to notify everyone about his open port. Client also tries to setup port forwarding using UPnP (but it's not always present and enabled). Client then sen...

Unable to read from the Socket Input Stream in a multithreaded environment with wait and notify

I am using 2 threads- ReaderThread for reading from the Socket input stream and the WriterThread for writing to the socket output stream. Both of them work fine when am just writing to the stream and not reading from the stream. But when am also Reading from the input stream the program doesn't run further, it hangs. Below is the code ...

What does -1 from DataInputStream's read() mean?

According to Java documentation, the read() method returns: -1 if there is no more data because the end the stream has been reached I don't quite understand what they mean by "end of stream". Currently I close/re-open the socket when this occurs (which I understood from much Googling to be an acceptable way to deal with this). Is -1...

Simple Java Client/Server Program

I'm writing my first java client/server program which just establishes a connection with the server sends it a sentence and the server sends the sentence back all capitalized. This is actually an example straight out of the book, and it works well and fine when I'm running the client and server on the same machine and using localhost for...

Socket close in java

I have a socket tcp connection between two java applications. When one side closes the socket the other side remains open. but I want it to be closed. And also I can't wait on it to see whether it is available or not and after that close it. I want some way to close it completely from one side. What can I do? ...

How does java send informations ?

Tell me. What heppens when I invoke Socket.getOutputStream.write(); then Socket.getOutputStream.flush(); ? Because when I want to send more than around 8162 bytes It sends only bytes which can be placed in this size. And next bytes aren't sent. Explain me please. ...

sockets - discover firewalled ports

I was reading the nmap source code because I'd like to find out how does it discover that certain ports are filtered or firewalled. I have some experience with sockets in c and i've built simple port scanners, that's easy - if the connection succeeds, the port is open, otherwise it's closed (because of the RST returned). But in case with...