×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Super Contributor
    Join Date
    Jun 2004
    Location
    SymbianLand
    Posts
    763

    [Solved]Socket open giving KErrBadName??

    Hi,
    I am trying to open a socket which will be used to listen connections
    over IR.
    Here's the code:
    Code:
    //initialisation code
    	ret = iSocketServ.Connect();
    	if(ret!=KErrNone)
    		User::Leave(ret);
    	ret = iSocketServ.FindProtocol(_L("IrTinyTP"),iProtocolInfo);
    ...........
    	result = iListeningSock.Open(iSocketServ,iProtocolInfo.iAddrFamily,KSockStream,iProtocolInfo.iProtocol);//returns a KErrBadName here
    Any clues what is wrong here?
    Bye.
    --Mayur.
    Last edited by mayur_24; 2005-04-06 at 09:57.

  2. #2
    Super Contributor
    Join Date
    Jun 2004
    Location
    SymbianLand
    Posts
    763
    Just did this
    Code:
    result = iListeningSock.Open(iSocketServ,iProtocolInfo.iName);
    instead of
    Code:
    result = iListeningSock.Open(iSocketServ,iProtocolInfo.iAddrFamily,KSockStream,iProtocolInfo.iProtocol);//returns a KErrBadName here

    and its working.
    Bye.
    --Mayur.

Posting Permissions

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