Solved

Need to write a server type app to respond to requests

Posted on 2006-11-23
4
212 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with consolidating excel files using VB.net 2 36
location of a form 2 33
ModalPopup  question 22 40
visual studio vb.net windows onkeyup 2 30
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

696 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