How can I tell if my client system has a network connection using python? I can assume the client connected with DHCP. I can't use lists of known reliable sites to ping to test the connection, as it needs to work in isolated networks as well as open ones.
I thought about fetching the local ip (should work, so long as it doesn't only ret...
I'm trying to get a VB.net (express 2010) app to connect to a socket server (keeping the connection open), how would I go about this? Right now it works using flash XMLsocket, I'm trying to build a new client without flash, using the existing server.
Currently I'm just using a simple window displaying messages, and a place to send messa...
Hello,
My application have an asio server socket that must accept connections from a defined List of IPs.
This filter must be done by the application, (not by the system), because it can change at any time (i must be able to update this list at any time)
The client must receive an acces_denied error.
I suppose when the handle_accept ...
I am trying to compile this .c code in windows using MinGW (gcc file.c -o compiled.exe):
/***************************************************/
/* AUTHOR : LAW CHIU YUEN */
/* FILENAME : smtpr.c */
/***************************************************/
#ifdef WIN32
#include <windows...
We're developing a cross-platform network application that needs to send and receive data over TCP. On linux we are using select() to wait on both send and receive to make sure that the socket is ready. However, on OSX the select for read takes an absurd amount of time to return -- over 20 seconds. select() isn't timing out -- our timeou...
Does anyone have any tips on how to calculate the bandwidth usage of a socket?
For example, as I send data over a socket to the server I am connected to, I want to show the Kb/s that is being sent.
Google search didn't reveal anything useful. Maybe I'm searching the wrong terms.
...
Good Afternoon Gurus,
I am pretty familiar with basic socket programming, and the IO::Socket module but I need to code something now that I have not encountered before. It will be a 3 tier application. The first tier is an event-loop that sends messages upstream when certain events are encountered. The second tier is the 'middle-ware' ...
Dear guys,
I have a GPS tracker from which I want to collect the location data that it stored somehow. Client software exist, but I want to try it for myself.
I already downloaded and installed the needed python libraries and successfully connected to the device. Now, I have the socket (sending "Hello World" results in "4") and I don't...
I'm writing a client/server architecture where there are going to be possibly hundreds of clients over multiple virtual machines, mostly on the intranet but some in other locations.
Each client will be gathering data constantly and sending a message to a server every second or so. Each message will probably be about 128 characters or so...
I'm trying to see if UDP hole punching is possible behind a certain NAT, but I've found that when the computer behind the NAT sends out UDP packets to two different IPs to the same port while being bound to the same port, the NAT assignes two different external port numbers. So behind this particular NAT, I believe UDP hole punching is i...
Hi guys,
I'm working on a small .dll dedicated to Tcp communication,
In my project I've got a server class that uses a TcpListener to accept incoming connections.
Incoming connections are stored in a Dictionary and handled from there.
Each connection's code looks like :
public class Connection : ConnectionBase<Coder.Coder>
{
...
I'm trying to create my own subclass of socket.socket that will be able to handle custom messages. So far my code looks like this:
self._sockets.append(s)
logging.debug("Waiting for incoming connections on port %d" % (port))
while not self.shutdown:
inputready,outputready,exceptready = select(self._sockets,[],[])
...
every time i am writing some data to my server i first send a message containing a number which is suppose to tell the server how much data i am going to send.
For example before sending 1024 bytes, i need to first send the "1024" to the server then server can start reading for 1024 bytes.
How can i make sure the first message (number o...
I want to create a chat room using HTML5 web sockets, but am pretty lost. From what I can tell, the following is required:
A browser that supports web sockets (Chrome, Safari)
Some kind of server-side scripting
Some kind of client-side scripting
I've got #1 down :) but #2 is seriously tripping me up. Beyond amateur PHP work (generall...
Hi all,
I had built a java TCPServer using serversocketchannels running on one port. However, it is not very scalable as it attends to one incoming socket (blocking mode) only.
I want to extend this TCPServer to service multiple incoming sockets (maximum 10 incoming sockets). As such, am wondering if i should implement the TCPServer us...
Hi,
I've got this kind of code to port to Java:
public class MyClass
{
Stream _stream;
AsyncCallback callback;
IAsyncResult readOperation;
public MyClass(string host, string port)
{
TcpClient tcpClient = new TcpClient();
tcpClient.Connect(host, port);
_stream = tcpClient.GetStream();
...
Hi, I need Mosquitto http://mosquitto.org to work with SSL.
I've read several examples with OpenSSL, but as I've never worked with sockets in C, can someone tell me what do I have to change for my existing sockets? (Accept, write, read?)
Thank you very much
...
How can the shooting game servers handle the timing, for example when a player shoots another, how do they make sure that both players get the message at the exact same time.
or on most of them u see every detail that a player makes in every second, and both players see the exact same moves on their client? how do the game servers manag...
Hi All,
Want to get a Google home page through proxy using JAVA & i must use only sockets in java NOT URL class. I need to authenticate with some username & password to proxy. How to do this????(I am not allowed to use URL only socket can be used)
Please reply,
Thank's For Reading!!!
...
hi guys,
i want to make a client - server application in c# with asyncronus socket programming and i want to send a simple image file from client to another client connected to the server. I've a serialized class that contain the property as username ecc.. and a variable in byte that containt an array of byte of image. The problem is t...