| Reply | « Previous Thread | Next Thread » |
|
Hi,
I think i'll be using something like this on my client (using RHostResolver and TNameEntry): //got this from one of the threads TBTSockAddr iBTSockAddr( iNameEntry().iAddr); iBTSockAddr.SetBTAddr(iBTSockAddr.BTAddr()); iBTSockAddr.SetPort(KRfcommChannel); iSendingSocket.Connect(iBTSockAddr,iStatus); My questions are: 1) I'm not sure about the KRfcommChannel though. I'm using L2CAP and RFCOMM. What is the difference if i use iBTSockAddr.SetPort(iBTSockAddr.Port()); ? ....... 2) I'm assuming that this port corresponds to the servers port.. Am i right? //Server code: User::LeaveIfError( iListeningSocket.GetOpt(KRFCOMMGetAvailableServerChannel, KSolBtRFCOMM, channel) ); TBTSockAddr listeningAddress; listeningAddress.SetPort(channel); //the port the client connects to corresponds to 'channel'? iListeningSocket.Accept(iAcceptedSocket, iStatus); SetActive(); Please advise... thanks - aDvo - |
|
RFComm channels are generally dynamically assigned, as done by GetOpt().
The server needs to advertise itself in the SDP database, and the client needs to parse the appropriate record for information about how to connect. |
| stevecotton |
| View Public Profile |
| Find all posts by stevecotton |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|