The shutdown method shuts down part of a full-duplex connection.
int shutdown (int sockfd, int how);
The shutdown system call causes all or part of a full-duplex connection on the socket associated with the file descriptor sockfd to be shutdown. The how argument specifies the type of shutdown. Possible values are:
Following is the usage of shutdown function in Open C socket interface:
#include <sys/socket.h> #include <netinet/in.h> #include <unistd.h> TInt shutdown_example() { int sock_fd; sockaddr_in addr,ss; unsigned int len; sock_fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); addr.sin_family = AF_INET; addr.sin_addr.s_addr = htonl(INADDR_ANY); addr.sin_port = htons(5000); bind(sock_fd,(sockaddr*)&addr,sizeof(addr)); shutdown(sock_fd, SHUT_RD) close(sock_fd); }
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| YUCCA Help : BT Sockets : Wierd Problem?? | mayur_24 | General Symbian C++ | 5 | 2004-09-20 13:18 |
| low-level sockets | shadow-2005 | Symbian Networking & Messaging | 12 | 2006-07-12 14:46 |
| GPRS on Symbian 6.1 | marco1475_ | Symbian Networking & Messaging | 8 | 2004-02-18 10:07 |
| How to download file from server into app | vyablokov | General Symbian C++ | 1 | 2004-12-18 21:54 |
| Sharing GPRS connection in 2 processes(RConnection)... | stenlik | Symbian Networking & Messaging | 2 | 2007-01-12 10:21 |