Solved

Programming over a LAN

Posted on 1998-08-27
5
225 Views
Last Modified: 2010-04-10
I want to have a machine on a LAN to run a program in the background.  This program will just sit idle until a certain stream of bits comes over the LAN.  Then an action will take place, similar to sending messages over a LAN in Netware.  I am using VC++.  Is there a prewritten library of functions to assist me with this, ones at a higher level than Winsock, or do I need to start there?  Thanks!
0
Comment
Question by:mitchell042997
5 Comments
 

Expert Comment

by:PSV
ID: 1171459
Please check out wsock sample from MSDN July 96. In one of option it connect a socket
at specified port & then wait for connection from another user asynchronisaly.

Another solution is use Threads
0
 

Expert Comment

by:bdymott
ID: 1171460
You could try UDP. This is similar to TCP but it doesnt require a connection. The MFC CSocket is a good way to use UDP
0
 
LVL 2

Author Comment

by:mitchell042997
ID: 1171461
I need to use TCP/IP.  Thanks, though, for your comment.
0
 
LVL 1

Accepted Solution

by:
gasim earned 100 total points
ID: 1171462
Why don't you use an RPC Server and an RPC client.
They are really easy to program and all TCP/IP connectivity details is totally transparent to you. All you have to supply is the protocol to use and in case of TCP/IP the port number.
Check MSDN for RPC under WIN32 SDK
0
 
LVL 1

Expert Comment

by:gasim
ID: 1171463
Why don't you use an RPC Server and an RPC client.
They are really easy to program and all TCP/IP connectivity details is totally transparent to you. All you have to supply is the protocol to use and in case of TCP/IP the port number.
Check MSDN for RPC under WIN32 SDK.
You can have your program automatically activated when the stream of bits comes by implementing the RPC Server in a service that checks for an incoming stream every second.
There is no overhead in this program since the Main service thread can ideally be completely suspended during inativity.
I can help you and implement the whole Service and RPC Server code if you want (I'm not looking for points, just a have a lot of sapre time...!)
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question