I have two process( written in C++) running in windows 10 surface. So, I want do a wireless communication from one process to another. I know that socket communication can be used for network communication. My worry is whether it is possible to communicate through wifi between these process in windows 10 or not?
If its is not possible what is possible way of wireless communication
Update:
Sorry for the confusion. This communication is between processes in two different machine over wifi. I know that a socket communication will do the trick for a wired connection.My doubt is whether this communication is possible over wifi between two windows machines
wifi is just a communication method, as long as the drivers of both sides of the communication are correctly installed, socket communication can be performed in the same local area network.
Related
I begin network programming with C++ in Windows OS. I know what is a Network protocol stack (like Educational Model of OSI and Operational Model of TCP/IP). Also, I know how a packet routed and switched in a network medium and many more other concepts about network programming and communication itself.
However, I know now when a process in Machine A wants to send a message to another process in machine B, the message must go through TCP/IP stack layers until it could be ready to put on physical media to reach the destination process in Machine B.
Packet should have the destination IP address of Machine B and also a Port Number. But I could not figure out the answer to the following questions:
Why we should specify a Port and how these 6000+ ports in operating systems (Windows) distinguished from each other?
How TCP/IP network protocol stack implemented in Windows OS? It is a driver or something else.
In Windows operating systems, every process has a TCP/IP protocol for itself or windows process uses the same TCP/IP protocol stack for them?
I know, these kinda questions are not too good for StackOverflow fans, but unfortunately, I couldn't find out the answer to these questions in the books or even via googling.
The port number is used to distinguish different applications running on the same machine from each other. Usually all (at least most) programs on the same machine will be communicating via the same IP address. The kernel needs to know what messages to dispatch to what program, the port number solves this problem. Each program will be communicating on a unique port, so when a message arrives for port x, the kernel knows what program to send the message to. Without the port number it would have to send the message to all programs and they would have to figure out if any given message was meant for them.
As for what books to read; I'd recommend "TCP/IP Illustrated, Volume 1 through 3" and UNIX Network Programming.
I have a project where I don't have enough throughput with one Bluetooth CSR USB dongle to support 3-4 heart monitors at the same time. Is there a way to connect to more than one bluetooth HCI so I can connect to more heart monitors?
If you run two instances of your bluetooth stack / driver then yes you can, But you will have to manage these 2 applications separately.
I have never seen any standard / commercial stack that handles two HCIs simultaneously.
I have multiple computers on a Wifi router. For the iPhone/iPad In objective-c how can I determine what computer is on what tcpip socket address so I can choose and connect to that computer? (each computer is a socket server written in c++ and I need to be able to easily check the status that is out putted)
If your computers are all Macs, it is pretty easy. Simply use the NSNetservice class to advertise the service and the socket port that you already have.
Then, on the iOS devices, simply use a NSNetServiceBrowser object to look for your particular service by name, and connect to one or all of them as required.
If your computers are not Macs, you can look into Bonjour for Windows, or any Zeroconf implementation such as Avahi on Linux.
TCP programming
I Want to access the COM port present in the remote system from system. Any help would be appreciable.
I am using windows XP in both remote as well as local system.
The com0com project, and especially the com2tcp application should help you.
In conjunction with the Null-modem
emulator (com0com) the com2tcp enables
to use a COM port based applications
to communicate with the TCP/IP based
applications. It also allows
communication with a remote serial
port via the TCP/IP.
Personally, I use SerProxy, which makes that com port looks like telnet:
Serproxy is a multi-threaded proxy program for redirecting network socket connections to/from serial links, in cases where the remote end of the serial link doesn't have a TCP/IP stack (eg an embedded or microcontroller system). The proxy allows other hosts on the network to communicate with the system on the remote end of the serial link.
I also looked into com0com before, but I finally decide not to use it, as it requires a driver installation. Where as serproxy just need to be run. Another nice part is that if the com port is not being "used" remotely, I can still access it locally.
I've used Advanced Virtual COM Port to share a COM port remotely.
On the local PC, it creates a virtual COM port that mirrors the activity of a real COM port on the remote PC. The remote PC can be on a local network or on the Internet. (If on the Internet, you just have to make sure your firewalls allow the particular TCP ports through.)
I tried several programs to share a COM port remotely, but this was the only one I found that also shared the serial hardware handshaking signals. So we picked this one, and it worked great. We used it about 3 years ago, to access a Japanese CDMA modem dev board, sitting in Japan, from Australia.
I want to develop a bandwidth allocator to a network which will be behind my machine.
Now, I've read about NDIS but I am not sure whether the network traffic that is neither originating from my machine nor is destined for my machine will enter my TCP/IP stack, so that I can block/unblock packets via NDIS on a windows machine.
NDIS (kernel) drivers live in the Windows network stack, and so can only intercept packets which are handled by this stack.
You cannot filter packets which are not send to your computer.
(When the computer acts as a router, the packets are send to the computer and the computer forwards the packets to the actual recepient, if that was the question)
In normal operation mode the irrelevant traffic will be dropped by the NIC driver/firmware, like pointed above. However, this is a SW issue so this behavior can be changed by adding an appropriate logic into the device driver and/or firmware. This is how sniffers operate, for example.