Problem regarding binding of Socket..
| Tue, 2006-04-25 12:55 | |
|
hi
my code is not being able to bind socket, neither my code is leaving anywhere. i am giving my piece of code, if anybody can suggest that what could be possible reasons to this problem.... i want to make clear that i am running this code on emultor n i have issued Open(socketserversession,KAfInet,KSockDatagram,KUnspecified); prior to CSocket::Bind() without any RConnection instance. N also iSocket is member variable of CSocket class. TInt CSocket::Bind(TUint aLocalPort) { TInetAddr anAddr(aLocalPort); const TUint32 KInetAddr = INET_ADDR(127,0,0,1); anAddr.SetAddress(KInetAddr); User::LeaveIfError(iSocket.Bind(anAddr)); TInetAddr addr; iSocket.LocalName(addr); //At this point i am checking whether socket is binded to correct address or not. if(! addr.Match(anAddr)) { //control of the program is getting inside this if statement. } iStateOfSocket=ESocketBinded;//Socket state changed. return 1; } |
|






Forum posts: 100
Are you possibliy using some replacement library like (prnsock.lib or something).
Forum posts: 41
Are you possibliy using some replacement library like (prnsock.lib or something).
iSocket member variable in my class is the instance RSocket class which is linked against esock.lib in the mmp file.
Amit.
Forum posts: 41
Amit.