×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Sep 2005
    Posts
    57

    problem with socket write

    hi,

    i opened a socket and i am trying to write to the socket

    void CSocket::WriteL(const TDesC8 &Data)
    {
    if ( SockStatus == EConnected && !IsActive())
    {
    iSocket.Write( Data, iStatus );
    iWriteStatus = ESending;
    SetActive();
    }
    }

    i can see the data on the server only if i close the socket.
    void RunL()
    {
    switch( iWriteStatus )
    {
    // Character has been written to socket
    case ESending:
    StatusMessage(_L("write completer"));
    iSocket.Close();
    break;
    }
    }

    can i flush the data with out closing the socket

    how can i do it.can any one help me.

    Thanks and regards

  2. #2
    Registered User
    Join Date
    Jan 2005
    Location
    Helsinki, Finland
    Posts
    257

    Re: problem with socket write

    I guessed you r using tcp protocol and iSocket.Read() at server side. This function returns when the full amount of requested data has been received or the connection breaks. So you better use iSocket.RecvOneOrMore() at server side. This method returns as soon as any data is a available.

Similar Threads

  1. Server Socket Problem on Nokia 6680: acceptAndOpen does not work
    By opistara in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2009-08-06, 11:20
  2. Socket problem on 3650
    By yinjialiang in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2004-03-02, 08:06
  3. socket connection problem
    By bhatti81 in forum Mobile Java General
    Replies: 2
    Last Post: 2003-10-08, 14:43
  4. Problem Socket in 7650 Phone
    By yaney in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2002-11-06, 05:37
  5. TCP/IP socket connection problem
    By ArunP in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2002-09-19, 10:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×