×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Aug 2007
    Posts
    55

    Synchronous TCP connection to server

    Hi!

    I have a server written in C++/CLI and I want to communicate synchronously with it. In a nutshell, the symbian client (s60 3rd) connects to the server and sends request to it, the server handles these requests and sends back some data. After this, the client may send another request or close the connection. In other words the connection would be strictly synchronous.

    Is it okay for me to just create an RSocketServ and RSocket and then socket.Write() and socket.Read() the data to/from the server? What about the second parameter to these functions? Is it correct to pass a TRequestStatus object to them and then call User::WaitForRequest(status); after every Read/Write? This should make the calls blocking, right? As you can see I am not very comfortable with Active Objects (yet).

    Thanks for any pointers you can give me!

    //Sebastian Ahlman

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,750

    Re: Synchronous TCP connection to server

    Quote Originally Posted by ahlmans View Post
    Is it okay for me to just create an RSocketServ and RSocket and then socket.Write() and socket.Read() the data to/from the server? What about the second parameter to these functions? Is it correct to pass a TRequestStatus object to them and then call User::WaitForRequest(status); after every Read/Write? This should make the calls blocking, right? As you can see I am not very comfortable with Active Objects (yet).
    For experimenting, it is OK. However if you start experiencing WSERV 12 panics, remember that a GUI application is expected to answer events originating from the Window Server in a limited time. If you spend too much time with WaitForRequest-s, the Window Server will assume that your application is completely hung, and shuts it down with the above panic reason.
    Note that panic codes are not visible by default, check http://wiki.forum.nokia.com/index.ph...ded_panic_code in order to enable them.

Similar Threads

  1. Replies: 0
    Last Post: 2007-01-23, 04:43
  2. Problems with socket connection between client and server
    By Al_KaRaJo in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2006-11-15, 18:28
  3. Replies: 1
    Last Post: 2006-02-18, 02:12
  4. how to send data at connection request phase over RSoceket using TCP protocol
    By madsum in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-10-04, 09:59
  5. Closing TCP connection by remote server
    By mkeke in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2004-08-31, 17:29

Posting Permissions

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