Categories: Open C | How To | Code Examples | Networking | TCP/IP
This page was last modified 18:26, 2 October 2007.
Start new Socket Connection to Access Point
From Forum Nokia Wiki
Once you get the available access points list, the following code shows how to start a new connection using available access points.
void ConnectToAP(char *ifname) { ifreq ifr; int sockfd; // Name of the interface strcpy(ifr.ifr_name, ifname); sockfd = socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP); ioctl(sockfd,SIOCSIFNAME, &ifr); ioctl(sockfd, SIOCIFSTART , &ifr); // recvfrom() and sendto() operations on socket sockfd ioctl(sockfd, SIOCIFSTOP, &ifr); close(sockfd); return ret; }
In the above code,SIOCSIFNAME API is used to select the access point.
Links
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to set default access point for sending email using RSendAs? | xhsoldier | General Symbian C++ | 4 | 2006-08-17 10:05 |
| how to determine phone's IP address? | xchip | Python | 12 | 2008-04-20 15:24 |
| Socket Example don't shows IAP dialog | deepbeat | General Symbian C++ | 2 | 2006-04-26 16:03 |
| HTTP Application - Series 60 C++ - Connection using WAP Access Point Hangs/Times-Out? | symbian_ravi | Symbian Networking & Messaging | 10 | 2006-12-22 12:33 |
| Set Preferred Access Point | Quarrybaby | Mobile Java General | 0 | 2006-11-05 11:36 |
