473,400 Members | 2,163 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

one server multiple client

i have little knowledge in C++ i want to develop code for one server and multiple clients, i got code for single client and single server iam posting mycode here based on this code can you write another client code?
please help me any one

Expand|Select|Wrap|Line Numbers
  1. server.cpp
  2. #include "PracticalSocket.h"  // For Socket, ServerSocket, and SocketException
  3. #include <iostream>           // For cerr and cout
  4. #include <cstdlib>            // For atoi()
  5.  
  6. using namespace std;
  7.  
  8. const unsigned int RCVBUFSIZE = 32;    // Size of receive buffer
  9.  
  10. void HandleTCPClient(TCPSocket *sock); // TCP client handling function
  11.  
  12. int main(int argc, char *argv[]) {
  13.   if (argc != 2) {                     // Test for correct number of arguments
  14.     cerr << "Usage: " << argv[0] << " <Server Port>" << endl;
  15.     exit(1);
  16.   }
  17.  
  18.   unsigned short echoServPort = atoi(argv[1]);  // First arg: local port
  19.  
  20.   try {
  21.     TCPServerSocket servSock(echoServPort);     // Server Socket object
  22.  
  23.     for (;;) {   // Run forever
  24.       HandleTCPClient(servSock.accept());       // Wait for a client to connect
  25.     }
  26.   } catch (SocketException &e) {
  27.     cerr << e.what() << endl;
  28.     exit(1);
  29.   }
  30.   // NOT REACHED
  31.  
  32.   return 0;
  33. }
  34.  
  35. // TCP client handling function
  36. void HandleTCPClient(TCPSocket *sock) {
  37.   cout << "Handling client ";
  38.   try {
  39.     cout << sock->getForeignAddress() << ":";
  40.   } catch (SocketException e) {
  41.     cerr << "Unable to get foreign address" << endl;
  42.   }
  43.   try {
  44.     cout << sock->getForeignPort();
  45.   } catch (SocketException e) {
  46.     cerr << "Unable to get foreign port" << endl;
  47.   }
  48.   cout << endl;
  49.  
  50.   // Send received string and receive again until the end of transmission
  51.   char echoBuffer[RCVBUFSIZE];
  52.   int recvMsgSize;
  53.   while ((recvMsgSize = sock->recv(echoBuffer, RCVBUFSIZE)) > 0) { // Zero means
  54.                                                          // end of transmission
  55.     // Echo message back to client
  56.     sock->send(echoBuffer, recvMsgSize);
  57.   }
  58.   delete sock;
  59. }
  60.  
  61.  
  62.  
  63. client.cpp
  64.  
  65.  
  66. #include "PracticalSocket.h"  // For Socket and SocketException
  67. #include <iostream>           // For cerr and cout
  68. #include <cstdlib>            // For atoi()
  69.  
  70. using namespace std;
  71.  
  72. const int RCVBUFSIZE = 32;    // Size of receive buffer
  73.  
  74. int main(int argc, char *argv[]) {
  75.   if ((argc < 3) || (argc > 4)) {     // Test for correct number of arguments
  76.     cerr << "Usage: " << argv[0] 
  77.          << " <Server> <Echo String> [<Server Port>]" << endl;
  78.     exit(1);
  79.   }
  80.  
  81.   string servAddress = argv[1]; // First arg: server address
  82.   char *echoString = argv[2];   // Second arg: string to echo
  83.   int echoStringLen = strlen(echoString);   // Determine input length
  84.   unsigned short echoServPort = (argc == 4) ? atoi(argv[3]) : 7;
  85.  
  86.   try {
  87.     // Establish connection with the echo server
  88.     TCPSocket sock(servAddress, echoServPort);
  89.  
  90.     // Send the string to the echo server
  91.     sock.send(echoString, echoStringLen);
  92.  
  93.     char echoBuffer[RCVBUFSIZE + 1];    // Buffer for echo string + \0
  94.     int bytesReceived = 0;              // Bytes read on each recv()
  95.     int totalBytesReceived = 0;         // Total bytes read
  96.     // Receive the same string back from the server
  97.     cout << "Received: ";               // Setup to print the echoed string
  98.     while (totalBytesReceived < echoStringLen) {
  99.       // Receive up to the buffer size bytes from the sender
  100.       if ((bytesReceived = (sock.recv(echoBuffer, RCVBUFSIZE))) <= 0) {
  101.         cerr << "Unable to read";
  102.         exit(1);
  103.       }
  104.       totalBytesReceived += bytesReceived;     // Keep tally of total bytes
  105.       echoBuffer[bytesReceived] = '\0';        // Terminate the string!
  106.       cout << echoBuffer;                      // Print the echo buffer
  107.     }
  108.     cout << endl;
  109.  
  110.     // Destructor closes the socket
  111.  
  112.   } catch(SocketException &e) {
  113.     cerr << e.what() << endl;
  114.     exit(1);
  115.   }
  116.  
  117.   return 0;
  118. }
  119.  
  120.  
  121.  
  122. practicalSocket.h
  123.  
  124. #ifndef __PRACTICALSOCKET_INCLUDED__
  125. #define __PRACTICALSOCKET_INCLUDED__
  126.  
  127. #include <string>            // For string
  128. #include <exception>         // For exception class
  129.  
  130. using namespace std;
  131. class SocketException : public exception 
  132. {
  133.     public:
  134. SocketException(const string &message, bool inclSysMsg = false) throw();
  135. ~SocketException() throw();
  136. const char *what() const throw();
  137.  
  138. private:
  139.   string userMessage;  // Exception message
  140. };
  141. class Socket {
  142. public:
  143. ~Socket();
  144. string getLocalAddress() throw(SocketException);
  145. unsigned short getLocalPort() throw(SocketException);
  146. void setLocalPort(unsigned short localPort) throw(SocketException);
  147. void setLocalAddressAndPort(const string &localAddress, 
  148.     unsigned short localPort = 0) throw(SocketException);
  149. static void cleanUp() throw(SocketException);
  150.  
  151. static unsigned short resolveService(const string &service,
  152.                                        const string &protocol = "tcp");
  153.  
  154. private:
  155.  
  156. Socket(const Socket &sock);
  157.   void operator=(const Socket &sock);
  158.  
  159. protected:
  160.   int sockDesc;              // Socket descriptor
  161.   Socket(int type, int protocol) throw(SocketException);
  162.   Socket(int sockDesc);
  163. };
  164. class CommunicatingSocket : public Socket 
  165. {
  166.    public:
  167.  
  168.  void connect(const string &foreignAddress, unsigned short foreignPort)
  169.     throw(SocketException);
  170. void send(const void *buffer, int bufferLen) throw(SocketException);
  171. int recv(void *buffer, int bufferLen) throw(SocketException);
  172.  
  173. string getForeignAddress() throw(SocketException);
  174. unsigned short getForeignPort() throw(SocketException);
  175.  
  176. protected:
  177.   CommunicatingSocket(int type, int protocol) throw(SocketException);
  178.   CommunicatingSocket(int newConnSD);
  179. };
  180.  
  181. class TCPSocket : public CommunicatingSocket {
  182. public:
  183. TCPSocket() throw(SocketException);
  184.  
  185. TCPSocket(const string &foreignAddress, unsigned short foreignPort) 
  186.       throw(SocketException);
  187.  
  188. private:
  189.   // Access for TCPServerSocket::accept() connection creation
  190.   friend class TCPServerSocket;
  191.   TCPSocket(int newConnSD);
  192. };
  193.  
  194. class TCPServerSocket : public Socket {
  195. public:
  196. TCPServerSocket(unsigned short localPort, int queueLen = 5) 
  197.       throw(SocketException);
  198.  
  199. TCPServerSocket(const string &localAddress, unsigned short localPort,
  200.       int queueLen = 5) throw(SocketException);
  201. TCPSocket *accept() throw(SocketException);
  202.  
  203. private:
  204.   void setListen(int queueLen) throw(SocketException);
  205. };
  206.  
  207. void disconnect() throw(SocketException);
  208.  
  209.  void sendTo(const void *buffer, int bufferLen, const string &foreignAddress,
  210.             unsigned short foreignPort) throw(SocketException);
  211.  
  212. int recvFrom(void *buffer, int bufferLen, string &sourceAddress, 
  213.                unsigned short &sourcePort) throw(SocketException);
  214.  
  215.  
  216. private:
  217.   void setBroadcast();
  218. };
  219.  
  220. #endif
  221.  
  222.  
  223.  
  224. procticalsocket.cpp
  225.  
  226.  
  227.  
  228. #include "PracticalSocket.h"
  229.  
  230. #ifdef WIN32
  231.   #include <winsock.h>         // For socket(), connect(), send(), and recv()
  232.   typedef int socklen_t;
  233.   typedef char raw_type;       // Type used for raw data on this platform
  234. #else
  235.   #include <sys/types.h>       // For data types
  236.   #include <sys/socket.h>      // For socket(), connect(), send(), and recv()
  237.   #include <netdb.h>           // For gethostbyname()
  238.   #include <arpa/inet.h>       // For inet_addr()
  239.   #include <unistd.h>          // For close()
  240.   #include <netinet/in.h>      // For sockaddr_in
  241.   typedef void raw_type;       // Type used for raw data on this platform
  242. #endif
  243.  
  244. #include <errno.h>             // For errno
  245.  
  246. using namespace std;
  247.  
  248. #ifdef WIN32
  249. static bool initialized = false;
  250. #endif
  251.  
  252. // SocketException Code
  253.  
  254. SocketException::SocketException(const string &message, bool inclSysMsg)
  255.   throw() : userMessage(message) {
  256.   if (inclSysMsg) {
  257.     userMessage.append(": ");
  258.     userMessage.append(strerror(errno));
  259.   }
  260. }
  261.  
  262. SocketException::~SocketException() throw() {
  263. }
  264.  
  265. const char *SocketException::what() const throw() {
  266.   return userMessage.c_str();
  267. }
  268.  
  269. // Function to fill in address structure given an address and port
  270. static void fillAddr(const string &address, unsigned short port, 
  271.                      sockaddr_in &addr) {
  272.   memset(&addr, 0, sizeof(addr));  // Zero out address structure
  273.   addr.sin_family = AF_INET;       // Internet address
  274.  
  275.   hostent *host;  // Resolve name
  276.   if ((host = gethostbyname(address.c_str())) == NULL) {
  277.     // strerror() will not work for gethostbyname() and hstrerror() 
  278.     // is supposedly obsolete
  279.     throw SocketException("Failed to resolve name (gethostbyname())");
  280.   }
  281.   addr.sin_addr.s_addr = *((unsigned long *) host->h_addr_list[0]);
  282.  
  283.   addr.sin_port = htons(port);     // Assign port in network byte order
  284. }
  285.  
  286. // Socket Code
  287.  
  288. Socket::Socket(int type, int protocol) throw(SocketException) {
  289.   #ifdef WIN32
  290.     if (!initialized) {
  291.       WORD wVersionRequested;
  292.       WSADATA wsaData;
  293.  
  294.       wVersionRequested = MAKEWORD(2, 0);              // Request WinSock v2.0
  295.       if (WSAStartup(wVersionRequested, &wsaData) != 0) {  // Load WinSock DLL
  296.         throw SocketException("Unable to load WinSock DLL");
  297.       }
  298.       initialized = true;
  299.     }
  300.   #endif
  301.  
  302.   // Make a new socket
  303.   if ((sockDesc = socket(PF_INET, type, protocol)) < 0) {
  304.     throw SocketException("Socket creation failed (socket())", true);
  305.   }
  306. }
  307.  
  308. Socket::Socket(int sockDesc) {
  309.   this->sockDesc = sockDesc;
  310. }
  311.  
  312. Socket::~Socket() {
  313.   #ifdef WIN32
  314.     ::closesocket(sockDesc);
  315.   #else
  316.     ::close(sockDesc);
  317.   #endif
  318.   sockDesc = -1;
  319. }
  320.  
  321. string Socket::getLocalAddress() throw(SocketException) {
  322.   sockaddr_in addr;
  323.   unsigned int addr_len = sizeof(addr);
  324.  
  325.   if (getsockname(sockDesc, (sockaddr *) &addr, (socklen_t *) &addr_len) < 0) {
  326.     throw SocketException("Fetch of local address failed (getsockname())", true);
  327.   }
  328.   return inet_ntoa(addr.sin_addr);
  329. }
  330.  
  331. unsigned short Socket::getLocalPort() throw(SocketException) {
  332.   sockaddr_in addr;
  333.   unsigned int addr_len = sizeof(addr);
  334.  
  335.   if (getsockname(sockDesc, (sockaddr *) &addr, (socklen_t *) &addr_len) < 0) {
  336.     throw SocketException("Fetch of local port failed (getsockname())", true);
  337.   }
  338.   return ntohs(addr.sin_port);
  339. }
  340.  
  341. void Socket::setLocalPort(unsigned short localPort) throw(SocketException) {
  342.   // Bind the socket to its port
  343.   sockaddr_in localAddr;
  344.   memset(&localAddr, 0, sizeof(localAddr));
  345.   localAddr.sin_family = AF_INET;
  346.   localAddr.sin_addr.s_addr = htonl(INADDR_ANY);
  347.   localAddr.sin_port = htons(localPort);
  348.  
  349.   if (bind(sockDesc, (sockaddr *) &localAddr, sizeof(sockaddr_in)) < 0) {
  350.     throw SocketException("Set of local port failed (bind())", true);
  351.   }
  352. }
  353.  
  354. void Socket::setLocalAddressAndPort(const string &localAddress,
  355.     unsigned short localPort) throw(SocketException) {
  356.   // Get the address of the requested host
  357.   sockaddr_in localAddr;
  358.   fillAddr(localAddress, localPort, localAddr);
  359.  
  360.   if (bind(sockDesc, (sockaddr *) &localAddr, sizeof(sockaddr_in)) < 0) {
  361.     throw SocketException("Set of local address and port failed (bind())", true);
  362.   }
  363. }
  364.  
  365. void Socket::cleanUp() throw(SocketException) {
  366.   #ifdef WIN32
  367.     if (WSACleanup() != 0) {
  368.       throw SocketException("WSACleanup() failed");
  369.     }
  370.   #endif
  371. }
  372.  
  373. unsigned short Socket::resolveService(const string &service,
  374.                                       const string &protocol) {
  375.   struct servent *serv;        /* Structure containing service information */
  376.  
  377.   if ((serv = getservbyname(service.c_str(), protocol.c_str())) == NULL)
  378.     return atoi(service.c_str());  /* Service is port number */
  379.   else 
  380.     return ntohs(serv->s_port);    /* Found port (network byte order) by name */
  381. }
  382.  
  383. // CommunicatingSocket Code
  384.  
  385. CommunicatingSocket::CommunicatingSocket(int type, int protocol)  
  386.     throw(SocketException) : Socket(type, protocol) {
  387. }
  388.  
  389. CommunicatingSocket::CommunicatingSocket(int newConnSD) : Socket(newConnSD) {
  390. }
  391.  
  392. void CommunicatingSocket::connect(const string &foreignAddress,
  393.     unsigned short foreignPort) throw(SocketException) {
  394.   // Get the address of the requested host
  395.   sockaddr_in destAddr;
  396.   fillAddr(foreignAddress, foreignPort, destAddr);
  397.  
  398.   // Try to connect to the given port
  399.   if (::connect(sockDesc, (sockaddr *) &destAddr, sizeof(destAddr)) < 0) {
  400.     throw SocketException("Connect failed (connect())", true);
  401.   }
  402. }
  403.  
  404. void CommunicatingSocket::send(const void *buffer, int bufferLen) 
  405.     throw(SocketException) {
  406.   if (::send(sockDesc, (raw_type *) buffer, bufferLen, 0) < 0) {
  407.     throw SocketException("Send failed (send())", true);
  408.   }
  409. }
  410.  
  411. int CommunicatingSocket::recv(void *buffer, int bufferLen) 
  412.     throw(SocketException) {
  413.   int rtn;
  414.   if ((rtn = ::recv(sockDesc, (raw_type *) buffer, bufferLen, 0)) < 0) {
  415.     throw SocketException("Received failed (recv())", true);
  416.   }
  417.  
  418.   return rtn;
  419. }
  420.  
  421. string CommunicatingSocket::getForeignAddress() 
  422.     throw(SocketException) {
  423.   sockaddr_in addr;
  424.   unsigned int addr_len = sizeof(addr);
  425.  
  426.   if (getpeername(sockDesc, (sockaddr *) &addr,(socklen_t *) &addr_len) < 0) {
  427.     throw SocketException("Fetch of foreign address failed (getpeername())", true);
  428.   }
  429.   return inet_ntoa(addr.sin_addr);
  430. }
  431.  
  432. unsigned short CommunicatingSocket::getForeignPort() throw(SocketException) {
  433.   sockaddr_in addr;
  434.   unsigned int addr_len = sizeof(addr);
  435.  
  436.   if (getpeername(sockDesc, (sockaddr *) &addr, (socklen_t *) &addr_len) < 0) {
  437.     throw SocketException("Fetch of foreign port failed (getpeername())", true);
  438.   }
  439.   return ntohs(addr.sin_port);
  440. }
  441.  
  442. // TCPSocket Code
  443.  
  444. TCPSocket::TCPSocket() 
  445.     throw(SocketException) : CommunicatingSocket(SOCK_STREAM, 
  446.     IPPROTO_TCP) {
  447. }
  448.  
  449. TCPSocket::TCPSocket(const string &foreignAddress, unsigned short foreignPort)
  450.     throw(SocketException) : CommunicatingSocket(SOCK_STREAM, IPPROTO_TCP) {
  451.   connect(foreignAddress, foreignPort);
  452. }
  453.  
  454. TCPSocket::TCPSocket(int newConnSD) : CommunicatingSocket(newConnSD) {
  455. }
  456.  
  457. // TCPServerSocket Code
  458.  
  459. TCPServerSocket::TCPServerSocket(unsigned short localPort, int queueLen) 
  460.     throw(SocketException) : Socket(SOCK_STREAM, IPPROTO_TCP) {
  461.   setLocalPort(localPort);
  462.   setListen(queueLen);
  463. }
  464.  
  465. TCPServerSocket::TCPServerSocket(const string &localAddress, 
  466.     unsigned short localPort, int queueLen) 
  467.     throw(SocketException) : Socket(SOCK_STREAM, IPPROTO_TCP) {
  468.   setLocalAddressAndPort(localAddress, localPort);
  469.   setListen(queueLen);
  470. }
  471.  
  472. TCPSocket *TCPServerSocket::accept() throw(SocketException) {
  473.   int newConnSD;
  474.   if ((newConnSD = ::accept(sockDesc, NULL, 0)) < 0) {
  475.     throw SocketException("Accept failed (accept())", true);
  476.   }
  477.  
  478.   return new TCPSocket(newConnSD);
  479. }
  480.  
  481. void TCPServerSocket::setListen(int queueLen) throw(SocketException) {
  482.   if (listen(sockDesc, queueLen) < 0) {
  483.     throw SocketException("Set listening socket failed (listen())", true);
  484.   }
  485. }
  486.  
  487. // UDPSocket Code
  488.  
  489. UDPSocket::UDPSocket() throw(SocketException) : CommunicatingSocket(SOCK_DGRAM,
  490.     IPPROTO_UDP) {
  491.   setBroadcast();
  492. }
  493.  
  494. UDPSocket::UDPSocket(unsigned short localPort)  throw(SocketException) : 
  495.     CommunicatingSocket(SOCK_DGRAM, IPPROTO_UDP) {
  496.   setLocalPort(localPort);
  497.   setBroadcast();
  498. }
  499.  
  500. UDPSocket::UDPSocket(const string &localAddress, unsigned short localPort) 
  501.      throw(SocketException) : CommunicatingSocket(SOCK_DGRAM, IPPROTO_UDP) {
  502.   setLocalAddressAndPort(localAddress, localPort);
  503.   setBroadcast();
  504. }
  505.  
  506. void UDPSocket::setBroadcast() {
  507.   // If this fails, we'll hear about it when we try to send.  This will allow 
  508.   // system that cannot broadcast to continue if they don't plan to broadcast
  509.   int broadcastPermission = 1;
  510.   setsockopt(sockDesc, SOL_SOCKET, SO_BROADCAST, 
  511.              (raw_type *) &broadcastPermission, sizeof(broadcastPermission));
  512. }
  513.  
  514. void UDPSocket::disconnect() throw(SocketException) {
  515.   sockaddr_in nullAddr;
  516.   memset(&nullAddr, 0, sizeof(nullAddr));
  517.   nullAddr.sin_family = AF_UNSPEC;
  518.  
  519.   // Try to disconnect
  520.   if (::connect(sockDesc, (sockaddr *) &nullAddr, sizeof(nullAddr)) < 0) {
  521.    #ifdef WIN32
  522.     if (errno != WSAEAFNOSUPPORT) {
  523.    #else
  524.     if (errno != EAFNOSUPPORT) {
  525.    #endif
  526.       throw SocketException("Disconnect failed (connect())", true);
  527.     }
  528.   }
  529. }
  530.  
  531. void UDPSocket::sendTo(const void *buffer, int bufferLen, 
  532.     const string &foreignAddress, unsigned short foreignPort) 
  533.     throw(SocketException) {
  534.   sockaddr_in destAddr;
  535.   fillAddr(foreignAddress, foreignPort, destAddr);
  536.  
  537.   // Write out the whole buffer as a single message.
  538.   if (sendto(sockDesc, (raw_type *) buffer, bufferLen, 0,
  539.              (sockaddr *) &destAddr, sizeof(destAddr)) != bufferLen) {
  540.     throw SocketException("Send failed (sendto())", true);
  541.   }
  542. }
  543.  
  544. int UDPSocket::recvFrom(void *buffer, int bufferLen, string &sourceAddress,
  545.     unsigned short &sourcePort) throw(SocketException) {
  546.   sockaddr_in clntAddr;
  547.   socklen_t addrLen = sizeof(clntAddr);
  548.   int rtn;
  549.   if ((rtn = recvfrom(sockDesc, (raw_type *) buffer, bufferLen, 0, 
  550.                       (sockaddr *) &clntAddr, (socklen_t *) &addrLen)) < 0) {
  551.     throw SocketException("Receive failed (recvfrom())", true);
  552.   }
  553.   sourceAddress = inet_ntoa(clntAddr.sin_addr);
  554.   sourcePort = ntohs(clntAddr.sin_port);
  555.  
  556.   return rtn;
  557. }
  558.  
  559. void UDPSocket::setMulticastTTL(unsigned char multicastTTL) throw(SocketException) {
  560.   if (setsockopt(sockDesc, IPPROTO_IP, IP_MULTICAST_TTL, 
  561.                  (raw_type *) &multicastTTL, sizeof(multicastTTL)) < 0) {
  562.     throw SocketException("Multicast TTL set failed (setsockopt())", true);
  563.   }
  564. }
  565.  
  566. void UDPSocket::joinGroup(const string &multicastGroup) throw(SocketException) {
  567.   struct ip_mreq multicastRequest;
  568.  
  569.   multicastRequest.imr_multiaddr.s_addr = inet_addr(multicastGroup.c_str());
  570.   multicastRequest.imr_interface.s_addr = htonl(INADDR_ANY);
  571.   if (setsockopt(sockDesc, IPPROTO_IP, IP_ADD_MEMBERSHIP, 
  572.                  (raw_type *) &multicastRequest, 
  573.                  sizeof(multicastRequest)) < 0) {
  574.     throw SocketException("Multicast group join failed (setsockopt())", true);
  575.   }
  576. }
  577.  
  578. void UDPSocket::leaveGroup(const string &multicastGroup) throw(SocketException) {
  579.   struct ip_mreq multicastRequest;
  580.  
  581.   multicastRequest.imr_multiaddr.s_addr = inet_addr(multicastGroup.c_str());
  582.   multicastRequest.imr_interface.s_addr = htonl(INADDR_ANY);
  583.   if (setsockopt(sockDesc, IPPROTO_IP, IP_DROP_MEMBERSHIP, 
  584.                  (raw_type *) &multicastRequest, 
  585.                  sizeof(multicastRequest)) < 0) {
  586.     throw SocketException("Multicast group leave failed (setsockopt())", true);
  587.   }
  588. }
Aug 2 '11 #1
2 4186
mac11
256 100+
Well I didn't read your code (it's a lot), but the general idea is that the server will sit and listen for connections from clients. When a client connects the server will fork off another process (or start a thread) to handle that client. Then the server's manager process (or thread) will go back to listening for another client.
Aug 2 '11 #2
weaknessforcats
9,208 Expert Mod 8TB
I can try to provide some help where a C/C++ question is involved but I cannot write code for you.

What you have here is poorly written C++ code and I recommend that you not use it.

I suggest you research the theory of client/server and not focus on a specific implementation. Unless you understand what you want to code, you will not be able to write the solution in any programming laguage.
Aug 2 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: learning_C++ | last post by:
Hi, I found some example code about server and client applications. But I can not run server and client in different computers. Now, I only run them in the different windows in Linux. I hope to...
7
by: Ken Allen | last post by:
I have a .net client/server application using remoting, and I cannot get the custom exception class to pass from the server to the client. The custom exception is derived from ApplicationException...
5
by: | last post by:
Hi all, HttpWebRequest, and SoapHttpClientProtocol both expose a ClientCertificates property, which can hold multiple client certificates, but on the service side, it can only receive one client...
4
by: z | last post by:
To reconfigure oracle9i from server to client operation, two files need to be modified: listener.ora (for the server IP address), and tnsnames.ora (for user permissions). What are the...
3
by: D. Yates | last post by:
Hi, I'm about to embark on a project that will both send and receive information to/from our client computers in the field. The area that I still need to finalize is the method of...
1
by: tsjuan | last post by:
Hello python users, I am just learning on how to use xmlrpc and stumbled upon how to pass com object from server to client side. The client side complain about can't marshall the com object....
7
by: Chacko | last post by:
Hi could anyone tell me how to simulate multiple clients for a windows form without actually me having to copy paste the code. Cause its a real pain.... The thing is i am working on remoting which...
5
by: raghubr | last post by:
Hi all, Can any one pls guide me through..I need to transfer the file from server to client and client to server using sockets in an Asynchronous mode so this file transfer doesn't hinder the...
2
by: thumban | last post by:
Hi, I was trying to commmunicate between a server and a client. The SERVER and CLIENT scripts are given below. With this script i was able to get the message from the server only if i type...
2
by: arijitdas | last post by:
Hi, We have an ASP.NET 2.0 web application where we want to share few user specific data between server and client side code using cookie. We are seeing a very strange behavior that it does not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.