المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : socket in service WCF



C# Programming
03-19-2013, 01:53 AM
I create a WCF web service that contains this method in service.svc:

public int positionGPS (_latitude string, string _longitude)
{
********** / / Send the ordinate DB
*********** DAL.GPSEntities bd = new DAL.GPSEntities ();
************ / / Table of the database table position
************ Pos = new TablePosition TablePosition ();

************
************ pos.latitude = _latitude;
************ pos.longitude = _longitude;

************ bd.AddToTablePosition (pos);
************ bd.SaveChanges ();

/ / Add the code for the socket

***** / /??????????
}

this method will be called back for a pda, gps coordinates
then they saved in the database.
*
my problem:
I want to know how to send these coordinates to another application winforms for tracing in real time in maps.
I know there is a method to use the socket, but I do not know how to apply in wcf, wcf then my service will be housed in the IIS server.
and in our case winforms application (the client socket that many) also PDAs.
and thank you in advance.