client « Socket « C Q&A

Home
C Q&A
1.assembly
2.buffer
3.Card
4.Cast
5.compile
6.console
7.const
8.constructor
9.database
10.Date
11.Debug
12.Design
13.Development
14.DLL
15.encrypt
16.enum
17.eof
18.Event
19.fork
20.Format
21.gcc
22.gdb
23.graph
24.graphics
25.gui
26.Holiday Event
27.image
28.IP
29.iterator
30.macro
31.makefile
32.malloc
33.Menu
34.mysql
35.network
36.openssl
37.operator
38.password
39.pipe
40.preprocessor
41.printf
42.pthread
43.Regular expression
44.scanf
45.semaphore
46.SerialPort
47.server
48.Socket
49.sql
50.SQLserver
51.sscanf
52.std
53.stdin
54.stdout
55.stl
56.strcmp
57.stream
58.switch
59.Template
60.thread
61.timer
62.unix
63.video
64.Virtual
65.visualstudio
66.winapi
67.windows
68.xml
C Q&A » Socket » client 

1. Detecting client TCP disconnection while using NetworkStream class    stackoverflow.com

A friend of mine came to me with a problem: when using the NetworkStream class on the server end of the connection, if the client disconnects, NetworkStream fails to detect it. Stripped ...

2. DNS Client that is written Using C Sockets    stackoverflow.com

I just want to write DNS client program using C sockets that takes three arguments: a query name (e.g., host name or domain name) and a query type (A, or NS, or ...

3. How to know if the client has terminated in sockets    stackoverflow.com

Suppose, I have a connected socket after writing this code..

if ((sd = accept(socket_d, (struct sockaddr *)&client_addr, &alen)) < 0)
{
    perror("accept failed\n");
    exit(1);
}
How can I know ...

4. using select to waiting for data on a client socket    stackoverflow.com

Any ideas why when the server writes a socket while the client is waiting on select, select never finishes? I am using c to communicate between sockets. My client connects to my ...

5. C socket client    stackoverflow.com

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h> 

void error(const char *msg) {
    perror(msg);
    exit(0);
}

int main(int argc, char *argv[]) {
    int ...

6. Disconnect idle sockets/clients C    stackoverflow.com

I am using select() statement that handles multiple client connections using Unix C sockets. I would like to disconnect idle clients - if I don't get any messages from clients after ...

7. TCP client socket, doesn't block on select()    stackoverflow.com


The following code is a test program wriiten to understand the behaviour of select() call in a TCP client program.
What I observe is that the select is not blocking, instead the ...

8. How to detect client-terminated connection using FCGI?    stackoverflow.com

I have a FCGI application written in C. We have cases where a client closes an active connection--i.e. leaves the page during page load--which we'd like to detect within the ...

9. Dereferencing error in client socket code    stackoverflow.com

Till yday my code was running fine, but today I am getting client.c:61:25: error: dereferencing pointer to incomplete type client.c:63:16: error: dereferencing pointer to incomplete type The lines have been written below again. ...

10. Distinguishing between multiple clients behind the same NAT    stackoverflow.com

I have a Server X and 2 clients A and B behind the same NAT. A and B need to form 10 TCP connections each to X on the same outbound ...

11. Socket, client (help-me)    cboard.cprogramming.com

I am beginning in C, I made a server in delphi and one client in C with some examples that I found in net... I obtained to make the two if to communicate, however I am with some problems in client... one of them is the BUFFER_SIZE that I have that to define a fixed value... and has commands that they ...

12. Socket Help - Multiple Clients    cboard.cprogramming.com

Socket Help - Multiple Clients Hey everyone, This is my first post on the forum, and I need some help. I am working on a basic client/server style program. Basically the server allows for 3 clients to connect at the same time, and it takes in bid requests and the server needs to keep track of a global bidding value that ...

13. socket web client    cboard.cprogramming.com

Code: #include "unp.h" #define MAXN 16384 /* max #bytes requested */ int main(int argc, char **argv) { int j, fd; pid_t pid; ssize_t n; char request[MAXLINE], reply[MAXN]; if (argc != 2) err_quit("usage: client "); nbytes = MAXN; snprintf(request, sizeof(request), "%d\n", nbytes); if ( (pid = Fork()) == 0) { /* child */ for (j = 0; j < ...

14. [sockets] Finding out if a browser client disconnected    cboard.cprogramming.com

Hello! This is currently my biggest problem with the chatserver. I need to find out if a client is still connected so I can free up the slot and close the connection when a client leaves. Every connected client goes into a loop, constantly writing new stuff to the socket (the browser) which is the chat stream. Unfortunatly the "write" function ...

15. Client socket program not able to connect    forums.devshed.com

Hello There, I am trying to change a simple client code that will retrieve the web pages from any web site using TCP sockets. It fails in the connect function. When I made the code run on my m/c (with a server), it worked fine but it doesnt create connection to other web sites like google and all. I have a ...

16. Sockets, client problemas    forums.devshed.com

Hi all, I am trying to connect to a server app I've done, but the client acts wierd. It doesn't connect and WSAGetLastError() doesnt return anything :S. Have a look at my code plz. Code: //Ett fildelnings server program som anvnder sig av WinSock2 och TC protokollet #include #include #include #include using namespace std; int main(){ //Ladda ...

17. Client Socket Programming    forums.devshed.com

I am trying to create a simple client socket application in Unix envmt #include #include #include #include int main (int argc, char *argv[]) { int sd; sd = socket(AF_INET, SOCK_STREAM, 0); } At compile time error comes on line where socket function is invoked saying "Undefined Symbol" I complie using gcc compiler

18. Help developping a socket client    daniweb.com

/* * File: Inside_Client.c * Author: Ghaith Hachem and Adel Youssef * * Created on March 17, 2008, 6:12 AM */ #define EXIT_SUCCESS 0 #define PORT 1234 #define IP "192.168.0.1" #include #include #include #include #include #include #include /* * */ //Variable Definitions //Hostname will be used later with gethostbyname(), i kept an example below ...

19. IO model for client handling multiple socket connection    codeproject.com

Why is that you can't use third party libraries? You're going to have to roll more than just your own socket abstraction for different OSes, you'll also need to take care of threading, and you won't be able to fork on windows... This just sounds like a bad situation to me. If this isn't some wacky school project, boost is basically ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.