如何实现一个数组在WAP中发送?怎样才能使数组连接到WAP?用RAS和套接字可以实现吗?

解决方案 »

  1.   

    数组作为socket等数据包发送过去,WAP收到后,解析等
      

  2.   

    试试用socket连接到WAP的代理网关:10.0.0.172:80
      

  3.   

    具体用C++如何实现啊?
    int connect(
    socket s,
    const struct sockaddr *10.0.0.172:80,
    );
    是这样连接吗?
      

  4.   

    需要先熟悉WAP协议,然后再学习socket通信...
    http://www.winu.cn/viewthread.php?tid=89014
      

  5.   

    CInternetSession  session; 
    CHttpConnection *pServer=session.GetHttpConnection("http://192.168.111.102/",0,80,NULL,NULL); 
    CHttpFile  *pFile=pServer->OpenRequest(CHttpConnection::HTTP_VERB_GET, 
    "viewer/avstream.shtml?streamid=first"); 
    //pFile->AddRequestHeaders(); 
    //CHttpFile *pFile=(CHttpFile *)session.OpenURL("http://192.168.111.102/"); 
    AfxMessageBox(" "); 
    int nFlag=pFile->SendRequest(); 
    CString str; 
    str.Format("%d",nFlag); 
    AfxMessageBox(str); 
    char ch[2000]; 
    memset(ch,0,2000); 
    pFile->Read(ch,2000); 
      

  6.   

    Your goal Actions you take Effects 
    Begin an Internet session. Create a CInternetSession object. Initializes WinInet and connects to server. 
    Read or set an Internet query option (time-out limit or number of retries, for example). Use CInternetSession::
    QueryOption orCInternetSession::
    SetOption. Returns FALSE if operation was unsuccessful. 
    Establish a callback function to monitor the status of the session. UseCInternetSession::
    EnableStatusCallback. Establishes a callback to CInternetSession::
    OnStatusCallback. Override OnStatusCallback to create your own callback routine. 
    Connect to an Internet server, intranet server, or local file. UseCInternetSession::
    OpenURL. Parses the URL and opens a connection to the specified server. Returns aCStdioFile (if you pass OpenURL a local file name) or aCInternetFile. This is the object through which you access data retrieved from the server or file.  
    Read from the file. UseCInternetFile::Read.  Reads the specified number of bytes using a buffer you supply. 
    Handle exceptions. Use theCInternetException class. Handles all common Internet exception types. 
    End the Internet session. Dispose of theCInternetSession object. Automatically cleans up open file handles and connections. 
      

  7.   

    同意5楼的看法,熟悉协议后用Socket来做
      

  8.   

    17楼的回到真简便!用Socket真的可以实现吗?不过我觉得还是用RAS通过GPRS连接WAP比较好!
      

  9.   

    这个问题我比较有心的  RAS和连接管理器只是起到连接作用,真正的传输数据可以用socket http  ftp  webservice(soap)  gsoap 都可以!  明白了吗?