Solved

Need to write a server type app to respond to requests

Posted on 2006-11-23
4
210 Views
Last Modified: 2010-04-23
Hi All,

I would like to write an app that does vehicle tracking. I have an idea that I could send the data over wireless internet, maybe gprs at this stage. The app, written in .net 2005, will send data to a web service at a given interval.

I need to be able to "poll" my vehicle and get it to return the vehicle position etc back, so thinking I may need the app to do some "servery" type things. I haven't done much in this area before, but I am guessing that if the tracking app runs its own sort of web server, the person or whatever that is polling this vehicle would then consume the service running on the vehicle?

Or am I way off!! LOL

Looking forward to hearing all the ideas!!

Thanks
0
Comment
Question by:nzfire
  • 2
  • 2
4 Comments
 
LVL 15

Expert Comment

by:Solar_Flare
ID: 18005411
so does the application in your car need to respond to poll requests from your house/office/whereever, or can it just send data at certain intervals.

having the car respond to requests means that yes, you need something running in your car listening for requests. if it is over wireless internet and you are able to 'connect' to your cars computer then you could easily write a small app that has a tcp listener running on a certain port. you could then connect on that port to the cars IP address and have the server application in the car send back the gps numbers.


is this the sort of thing you are trying to do?
0
 
LVL 1

Author Comment

by:nzfire
ID: 18005452
Hi Again Solar_Flare,

I would like it to do both. The vehicle will send data at an interval, and if required during this interval, a user can manually poll it. Polling the vehicle would also be good to determine that it is still connected etc etc..

What you have said is exactly what I would like to do!

Now, I would need the applications either side to both be able to send and receive data. I did something in VB6 a few years ago to keep an application (db) in sync with other workstations. Basically when a change was done on one workstation and another was viewing the same data, it would send a message to all workstations and refresh their screen.

I suppose this would be the way to go then? well similar at least.

0
 
LVL 15

Accepted Solution

by:
Solar_Flare earned 500 total points
ID: 18005692
yes both your car and the other end will need to be listening for incoming connections in the background, and also able to send data at will.

The best way to deal with this is to use TCPClient and TCPListener classes.
http://msdn2.microsoft.com/en-us/library/system.net.sockets.tcplistener.aspx
http://msdn2.microsoft.com/en-us/library/system.net.sockets.tcpclient.aspx

and a bit of an example around making a chat program, which is essentially what you want to do except that instead of displaying messages you want to process them for gps coordinates etc.
http://www.dotnet247.com/247reference/a.aspx?u=http://msdn.microsoft.com/library/en-us/dnadvnet/html/vbnet08282001.asp?frame=true
0
 
LVL 1

Author Comment

by:nzfire
ID: 18006429
Perfect, thanks.

Is very similar to what I did in vb6, but haven't got the source...
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

789 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