Categories: Open C/C++ | How To | Code Examples | Networking | TCP/IP
This page was last modified 14:19, 29 May 2008.
Start new Socket Connection to Access Point
From Forum Nokia Wiki
(Redirected from Start new Socket Connection to Acces Point)
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 |
| Http connection works initially, hangs after a while - Nokia Series 60 | sunilgoyal1 | Mobile Java General | 2 | 2006-10-06 17:24 |
| how to use wlan on n91 | zaibatsu2000 | General Discussion | 5 | 2006-06-15 18:10 |
| Open HTTP connection in E61 | yigalbeer | Symbian Networking & Messaging | 14 | 2007-05-25 12:28 |
| How to list all "Access Point Groups" and later use one as normal IAP? | Evgeniz | Symbian Networking & Messaging | 0 | 2007-12-18 16:33 |
| Select Access Point prompt in Midlet | gsusmonzon | Mobile Java Networking & Messaging & Security | 1 | 2007-01-04 20:20 |
