You Are Here:

Community: Developer Discussion Boards

#1 Old Exclamation About listening at specific port for incoming connection - 2008-11-07, 02:55

Join Date: Sep 2007
Posts: 52
Location: BeiJing
Send a message via MSN to haykey Send a message via Skype™ to haykey
haykey
Offline
Regular Contributor
Sorry for multiposting but I think I may get my answer here. Earlier I posted this at General Symbian C++.

Here are my codes related to RSocket.
User::LeaveIfError(iSocketServer.Connect());
User::LeaveIfError(iListeningSocket.Open(iSocketServer, KServerTransportName));

// Get a channel to listen on - same as the socket's port number
User::LeaveIfError(iListeningSocket.GetOpt(KRFCOMMGetAvailableServerChannel, KSolBtRFCOMM, iChannel));

TBTSockAddr listeningAddress;
listeningAddress.SetPort(iChannel);

User::LeaveIfError(iListeningSocket.Bind(listeningAddress));
User::LeaveIfError(iListeningSocket.Listen(KListeningQueSize));

//now set security
TBTServiceSecurity secSettings;

secSettings.SetUid(myuid);
secSettings.SetAuthentication(EFalse);
secSettings.SetAuthorisation(EFalse);
secSettings.SetEncryption(EFalse);

// attach the security settings.
listeningAddress.SetSecurity(secSettings);

iAcceptedSocket.Close(); // close old connection - if any
User::LeaveIfError(iAcceptedSocket.Open(iSocketServer));
// Open abstract socket

iState = EConnecting;
// set the listening socket to accept new connections on
// the accepted socket.
iListeningSocket.Accept(iAcceptedSocket, iStatus);
SetActive();

RunL method can never get invoked(I added some traces in the log file)It seems no connection request from client is submitted to server.Why?

What things can cause the passed request of RSocket::Accept not to be completed?

Moveover,I installed this soft into Nokia 3250 Phone,It's OK but In the Nokia N96,I can not connect from PC to Phone.

Any help will be greatly appreciated!!!
Reply With Quote

#2 Old Re: About listening at specific port for incoming connection - 2008-11-11, 14:37

Join Date: Mar 2008
Posts: 575
mahbub_s60's Avatar
mahbub_s60
Offline
Forum Nokia Expert
Though not sure, could you check if we need to set security before binding?


-Mahbub
Reply With Quote

#3 Old Re: About listening at specific port for incoming connection - 2008-11-12, 02:10

Join Date: Sep 2007
Posts: 52
Location: BeiJing
Send a message via MSN to haykey Send a message via Skype™ to haykey
haykey
Offline
Regular Contributor
Quote:
Originally Posted by mahbub_s60 View Post
Though not sure, could you check if we need to set security before binding?
Thanks for your reply,I will have a try.but I take the Chat sample from SDK as reference to implement these codes as below post
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Using http connection with port other than 80 jaazz Mobile Java Networking & Messaging & Security 1 2006-08-30 19:55
Gprs and Com Port Connection ndivhugp Mobile Java Networking & Messaging & Security 1 2004-09-22 18:51
serial port connection between jsr-82 midlet running on nokia 6600 and hyperterminal chrpriftis Mobile Java Networking & Messaging & Security 5 2003-12-05 18:18
Initialize Bluetooth Serial Port connection from Nokia 7650 Inferno Bluetooth Technology 2 2003-07-29 10:20
7650 Bluetooth Modem with Toshiba Tecra 9000 Windows XP - RESOLVED Now! d0lph1n Bluetooth Technology 5 2003-02-07 12:25

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia