ASTA SkyWire
Think Wireless
astaskywire.com / Products / SkyWire™ SmartClient Toolkit / Clients / eVC++ / Client-Side Example

SkyWire
See also

View help online

Client-Side Example

 

Below is a small code example of creating an AstaConnection and connecting to a remote ASTA SkyWire™ server from the Digital Ink demo client.

AstaHandle Params = AstaParamLstCreate();

AstaParamLstSetLongInt(Params, 0, total_pixels, TEXT("Total"));
AstaParamLstSetBlob(Params, 1, tlist, total_pixels * 3,
   TEXT("Sequence"));

AstaHandle conn = AstaClConvCreate();

if (conn)
   {
   if (AstaClConvOpenConnection(conn, AddressBuf, Port))
     {
     bool sent = AstaClConvSendParamList(conn, MsgID, Params);
     AstaParamLstDestroy(Params);
     if (!sent)
       {
       int i = AstaClConvGetLastError(conn);
       MessageBox(0, TEXT("Failed to send data"), NULL, 0);
       }
     AstaClConvReceiveStream(conn, &tlist, &tlsize);
     AstaClConvCloseConnection(conn);
     }
   else
     {
     AstaParamLstDestroy(Params);
     MessageBox(0, TEXT("Failed to connect to server"), NULL, 0);
     }
   }
AstaClConvDestroy(conn);
ASTA Technology Group
ASTA SkyWire
tel.: (208) 342-7800
Last modified: 2/24/2003 3:05:16 PM
© 1997-2004 Asta Technology Group
home search / site map