network-programming

How can I programmatically detect a Window's network adapter's duplex state?

I am using WMI to detect a number of items about a network adapter's state. Among the things I need to find out are (a) speed and (b) duplex. I have been able to detect the speed of a network adapter by using WMI and the following Python code: from pycom.client import wmi dev_name = r"\\DEVICE\\{287EB4BB-5C2A-4108-B377-15E1D0B0E760}"...

What is the xmlsocket:// protocol?

This SO answer says "The Flash Player now looks for a policy file on port 843".. I have a policy server that is listening on port 843 which sends out an XML policy to Flash clients. Is this enough? What is the "xmlsocket://" protocol? Is it just a way to tell Flash player that we're talking about sockets when using the loadPolicyFile() m...

Is there a program that can send data via sockets to a server, to test it?

I have a simple socket server, that waits for a message and responds. How can I test this? Is there a client app or something that can help me send some data on a specific port to a server, and see the output? Telnet? ...

Network programming abstraction, decomposition

I have a problem as follows: Server process 1 Constantly sends updates that occur to a datastore Server process 2 Clients contact the server, which queries the datastore, and returns a result The thing is, the results that process 1 and process 2 are sending back the client are totally different and unrelated. How does one deco...

How can I execute certain commands on a separate thread?

What is the best solution to allow an object to execute methods on a thread? The object is the owner of the TThread and the thread contains only a TidHTTP (blocking socket) to post request and parse the response. Example : Object > Execute Request on the Thread Thread > Send request via idHTTP, wait for response, send the result to th...

Enumerating computers in NT4 domain using WNetEnumResourceW (C++) or DirectoryEntry (C#)

I'm trying to enumerate computers in NT4 domains (not Active Directory) and support Unicode NetBIOS names. According to MSDN, WNetEnumResourceW is the Unicode counterpart of WNetEnumResource which to me would imply that using this would do the trick. However, I have not been able to get Unicode NetBIOS names properly using WNetEnumRes...

Are web-services THE defacto way of implementing client -> server communication when performance is not the dominating concern?

It seems that when people want to pass data from the client to the server, almost everybody just uses web services. Is the best way to do this when you don't need the performance of straight TCP? ...

Detecting the Loopback Adapter

What is the best way for detecting whether a network interface is a loopback adapter? The windows API's GetAdaptersInfo and GetAdaptersAddresses state in the documentation that they will return whether an interface is a loopback through the Type (MIB_IF_TYPE_LOOPBACK) but neither of these do for the Microsoft Loopback Adapter at least, ...

C# Socket server Ports

Hey, so I'm trying to build a simple lan game using sockets (not tcpclient or tcplistener, and yes I know they are the same thing). I managed to get the chat working, and now I'm trying to get the game to work. I read somewhere that the best way to manage the game data would be through another port on the server (if anyone can suggest a ...

How to program an audio/video application on network?

I want to make (for fun, challenge) a videoconference application, I have some ideas about this: 1) taking the audio/video streams (I don't know what an audio/video stream is) 2) pass this to a server that lets communicate the clients. I can figure out how to write a server(there are a lot of books and documentation about this) but I r...

Insert port traffic into SQL table

I'm working on a project where a hardware device will be sending small chunks of text data (around every 5 seconds) to a port on the Windows 2003 server. I need to capture that data and insert it into SQL server for later retrieval, display, analysis etc. Obviously I need something to monitor the port for the incoming traffic, and then ...

Standard way of using a single port for multiple sockets?

Hey I am writing an app in Twisted, and as it stands I have 4 servers bound two different ports all communicating with the client via JSON. Is there anyway to bind these 4 servers to the same port and have the interactions remain the same? For instance say the client subscribes to two different feeds, transmitted via a direct socket. R...

How to determine an incoming connection is from local machine

I have a SocketServer accepting incoming connections. For security reasons I should only allow local connections (connections from the machine on which server is running). How can I determine if an incoming connection is from another machine? Is the following code safe for this? Socket socket = someServerSocket.accept(); String remoteA...

Examples of OpenGL programs with networking code?

Hello, I'm wondering if anyone has/knows of any examples of networking code integrated with OpenGL. Basically, I need to send position coordinates of something over a network to my OpenGL display... which would then draw the object at the correct position. The problem I'm having is integrating my UDP code with the game. I basically ...

how to get started in p2p networking programming ?

I want to learn how to write a software using a peer to peer networking architecture but i don't know where to start, knowing that I use as a programming languages : c/c++ , lisp, a little of python. any pointer to documentation or tutorials is appreciated. ...

Catch network adapter up/down and address changed event (Windows, C#)

Hi there I am searching for a method to be notified when any windows network interfaces go up or down or the addresses of any network interfaces are changed. I would prefer solutions in C#, C is also possible. Winpcap could be used. I am aware that there is an event for network adapter address changes in C#, but this also possible w...

Server-client Java distributed application

Hi to all, I have to design a distributed application composed by one server (developed in Java) and one or more remote GUI clients (Swing application with windows). As stated before the clients are Swing GUI application that can connect to the server in order to receive and send data. The communication is bidirectional (Server <=> Cli...

C code to get the ip-address

Hi I like to know how to get the ip-address of the local machine using C code ? If there are multiple Interfaces then I should be able to display the ip-address of each interface. NOTE: Do not use any commands like ifconfig within C code to retrieve the ip-address. ...

Python TCP stack implementation

Is there a python library which implements a standalone TCP stack? I can't use the usual python socket library because I'm receiving a stream of packets over a socket (they are being tunneled to me over this socket). When I receive a TCP SYN packet addressed to a particular port, I'd like to accept the connection (send a syn-ack) and t...

Java network code not sending

I'm writing my first non-trivial Java app that uses: networking a GUI threads It's a IM program. When I send a message, the server doesn't output what it should. I'm sorry this description is so bad, but I don't know how to narrow the problem down further. public class MachatServer { //snip public static void sendMessage(i...