Search Results

Search found 26176 results on 1048 pages for 'stream socket client'.

Page 15/1048 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • C socket programming: client send() but server select() doesn't see it

    - by Fantastic Fourier
    Hey all, I have a server and a client running on two different machines where the client send()s but the server doesn't seem to receive the message. The server employs select() to monitor sockets for any incoming connections/messages. I can see that when the server accepts a new connection, it updates the fd_set array but always returns 0 despite the client send() messages. The connection is TCP and the machines are separated by like one router so dropping packets are highly unlikely. I have a feeling that it's not select() but perhaps send()/sendto() from client that may be the problem but I'm not sure how to go about localizing the problem area. while(1) { readset = info->read_set; ready = select(info->max_fd+1, &readset, NULL, NULL, &timeout); } above is the server side code where the server has a thread that runs select() indefinitely. rv = connect(sockfd, (struct sockaddr *) &server_address, sizeof(server_address)); printf("rv = %i\n", rv); if (rv < 0) { printf("MAIN: ERROR connect() %i: %s\n", errno, strerror(errno)); exit(1); } else printf("connected\n"); sleep(3); char * somemsg = "is this working yet?\0"; rv = send(sockfd, somemsg, sizeof(somemsg), NULL); if (rv < 0) printf("MAIN: ERROR send() %i: %s\n", errno, strerror(errno)); printf("MAIN: rv is %i\n", rv); rv = sendto(sockfd, somemsg, sizeof(somemsg), NULL, &server_address, sizeof(server_address)); if (rv < 0) printf("MAIN: ERROR sendto() %i: %s\n", errno, strerror(errno)); printf("MAIN: rv is %i\n", rv); and this is the client side where it connects and sends messages and returns connected MAIN: rv is 4 MAIN: rv is 4 any comments or insightful insights are appreciated.

    Read the article

  • How to end a relationship with a client without pissing them off?

    - by thesam18888
    Here's my situation: I'm a freelancing student and I was working on a software project for a client over the summer holidays of 2010. At the time I completed the application, tested it on my machine, delivered it to the client and went back to University. However the client is not completely satisfied with the product and apparently has found a couple of bugs with it. Ever since I went back to Uni, they have been chasing me up and asking me to spend some time to fix the bugs. I have explained that this is simply not possible as I am extremely busy with my Uni work and cannot afford to spare my time for anything else. The client is getting increasingly pissed off and have been chasing me by calling during lectures at evenings and even asking me if I could go over to their place over the weekend to talk about this. This is in turn pissing me off as well because they're essentially asking me to give up my education so that I could help them out by fixing bugs. I go to Uni 5 days a week, 9-6 and feel it is unreasonable for them to call me during evenings and to ask me to work over weekends etc. I would like to end my relationship with this client but would like to do it amicably without pissing them off. How can I do this? I really wish they would just find someone else but I was charging them piss-poor rates so I think they don't want to go to anyone else because they would have to pay more. EDIT The application does not seem to work perfectly on their machine. I had tested it extensively on my machine and it seemed to work fine. I am not sure what exactly is causing it to not work. I was paid a very low amount and it was on an hourly basis. e.g. I would send an invoice saying I worked on this for x amount of hours and they would pay me for it. Apart from the work itself, I have not charged them for all the time spent sending e-mails back and forth, phone calls, visits to their place etc. I would really like to end all my dealings with this client right away.

    Read the article

  • How important is using the same language for client and server?

    - by Makita
    I have been evaluating architecture solutions for a mobile project that will have a web-service/app in addition to native apps and have been looking at various libraries, frameworks, and stacks like Meteor, this being a sort of "open stack package framework", is tightly bound with Node.js. There is a lot of talk about the benefits of using the same language both client and server side, and I'm not getting it. I could understand if you want to mirror the entire state of a web application on both client and server but struggling to find other wins... Workflow efficiency? I'm trying to understand why client/server language parity is considered to be a holy grail. Why does client/server language parity matter in software development?

    Read the article

  • C socket programming: recv / select not seeing sent messages

    - by Fantastic Fourier
    Hey guys, I had some questions, about socket programming for client-server using TCP/IP. I am using select() to recv(), which works fine when client send() messages to server, but not the other way around. The send() returns positive (and reasonable) numbers of bytes sent by server but I know that the nubmer of bytes "sent" really means "sent out of the socket", not "sent and was received by the client." The select() function seems to work fine. So given that, my guess is that it's the send() function that is giving me the problem. Probably the address of client in send() is not correct. But when I compared address.sin_addr.s_addrmember (it's an unsigned long int) of struct sockaddr_in from recv() and send() of server, they are identical. So I am kind of lost as to what could be wrong?

    Read the article

  • Difference between a socket and a port

    - by cobie
    Could someone please explain quite clearly the difference between a port and a socket. I know that a port serves as a door into the network for an application process and that the application process uses a socket connection to the given port number to handle network communication but when you have multiple processes listening on a single port number, I am finding it difficult to understand the difference between the socket and the port and how they all fit together.

    Read the article

  • How to convince a non-technical client that their application spec needs to be simplified?

    - by Ryan
    Often times I am faced with the situation where a new client comes to me with an application that has literally 100s of unnecessary features and it is quite clear that things need to be drastically simplified for the project to have any chance of succeeding. How do you convince the client to take a more MVP approach and simplify? edit: So the current top answer is to provide the client with a time/cost estimate for the huge application. I'm not too fond of this answer because it doesn't address the real problem with this situation. And that is - it's a bad practice to spec out a massive application and then try and build it from the get go. I feel much more comfortable initially building a small, simple MVP foundation. And then adding small features to that foundation one by one. So how do I convince the client to approach building software in this way?

    Read the article

  • Preventing FIN_WAIT2 when closing socket

    - by patrickvacek
    I have a server program that connects to another program via a given socket, and in certain cases I need to close the connection and almost immediately re-open it on the same socket. This by and large works, except that I have to wait exactly one minute for the socket to reset. In the meantime, netstat indicates that the server sees the socket in FIN_WAIT2 and the client sees it as CLOSE_WAIT. I'm already using SO_REUSEADDR, which I thought would prevent the wait, but that isn't doing the trick. Setting SO_LINGER to zero also does not help. What else can I do to resolve this? Here are the relevant code snippets: SetUpSocket() { // Set up the socket and listen for a connection from the exelerate client. // Open a TCP/IP socket. m_baseSock = socket(PF_INET, SOCK_STREAM, IPPROTO_IP); if (m_baseSock < 0) { return XERROR; } // Set the socket options to reuse local addresses. int flag = 1; if (setsockopt(m_baseSock, SOL_SOCKET, SO_REUSEADDR, &flag, sizeof(flag)) == -1) { return XERROR; } // Set the socket options to prevent lingering after closing the socket. //~ linger li = {1,0}; //~ if (setsockopt(m_baseSock, SOL_SOCKET, SO_LINGER, &li, sizeof(li)) == -1) //~ { //~ return XERROR; //~ } // Bind the socket to the address of the current host and our given port. struct sockaddr_in addr; memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = INADDR_ANY; addr.sin_port = htons(m_port); if (bind(m_baseSock, (struct sockaddr*)&addr, sizeof(addr)) != 0) { return XERROR; } // Tell the socket to listen for a connection from client. if (listen(m_baseSock, 4) != 0) { return XERROR; } return XSUCCESS; } ConnectSocket() { // Add the socket to a file descriptor set. fd_set readfds; FD_ZERO(&readfds); FD_SET(m_baseSock, &readfds); // Set timeout to ten seconds. Plenty of time. struct timeval timeout; timeout.tv_sec = 10; timeout.tv_usec = 0; // Check to see if the socket is ready for reading. int numReady = select(m_baseSock + 1, &readfds, NULL, NULL, &timeout); if (numReady > 0) { int flags = fcntl(m_baseSock, F_GETFL, 0); fcntl(m_baseSock, flags | O_NONBLOCK, 1); // Wait for a connection attempt from the client. Do not block - we shouldn't // need to since we just selected. m_connectedSock = accept(m_baseSock, NULL, NULL); if (m_connectedSock > 0) { m_failedSend = false; m_logout = false; // Spawn a thread to accept commands from client. CreateThread(&m_controlThread, ControlThread, (void *)&m_connectedSock); return XSUCCESS; } } return XERROR; } ControlThread(void *arg) { // Get the socket from the argument. socket sock = *((socket*)arg); while (true) { // Add the socket to a file descriptor set. fd_set readfds; FD_ZERO(&readfds); FD_SET(sock, &readfds); // Set timeout to ten seconds. Plenty of time. struct timeval timeout; timeout.tv_sec = 10; timeout.tv_usec = 0; // Check if there is any readable data on the socket. int num_ready = select(sock + 1, &readfds, NULL, NULL, &timeout); if (num_ready < 0) { return NULL; } // If there is data, read it. else if (num_ready > 0) { // Check the read buffer. xuint8 buf[128]; ssize_t size_read = recv(sock, buf, sizeof(buf)); if (size_read > 0) { // Get the message out of the buffer. char msg = *buf; if (msg == CONNECTED) { // Do some things... } // If we get the log-out message, log out. else if (msg == LOGOUT) { return NULL; } } } } // while return NULL; } ~Server() { // Close the sockets. if (m_baseSock != SOCKET_ERROR) { close(m_baseSock); m_baseSock = SOCKET_ERROR; } if (m_connectedSock != SOCKET_ERROR) { close(m_connectedSock); m_connectedSock = SOCKET_ERROR; } } SOCKET_ERROR is equal to -1. The server object gets destroyed, at which point the connection should close, and then recreated, at which point the SetUpSocket() and ConnectSocket() routines are called. So why do I have to wait a minute for the socket to clear? Any ideas would be appreaciated.

    Read the article

  • Socket connection to a telnet-based server hangs on read

    - by mixwhit
    I'm trying to write a simple socket-based client in Python that will connect to a telnet server. I can test the server by telnetting to its port (5007), and entering text. It responds with a NAK (error) or an AK (success), sometimes accompanied by other text. Seems very simple. I wrote a client to connect and communicate with the server, but it hangs on the first attempt to read the response. The connection is successful. Queries like getsockname and getpeername are successful. The send command returns a value that equals the number of characters I'm sending, so it seems to be sending correctly. But in the end, it always hangs when I try to read the response. I've tried using both file-based objects like readline and write (via socket.makefile), as well as using send and recv. With the file object I tried making it with "rw" and reading and writing via that object, and later tried one object for "r" and another for "w" to separate them. None of these worked. I used a packet sniffer to watch what's going on. I'm not versed in all that I'm seeing, but during a telnet session I can see my typed text and the server's text coming back. During my Python socket connection, I can see my text going to the server, but packets back don't seem to have any text in them. Any ideas on what I'm doing wrong, or any strategies to try? Here's the code I'm using (in this case, it's with send and recv): #!/usr/bin/python host = "localhost" port = 5007 msg = "HELLO EMC 1 1" msg2 = "HELLO" import socket import sys try: skt = socket.socket(socket.AF_INET, socket.SOCK_STREAM) except socket.error, e: print("Error creating socket: %s" % e) sys.exit(1) try: skt.connect((host,port)) except socket.gaierror, e: print("Address-related error connecting to server: %s" % e) sys.exit(1) except socket.error, e: print("Error connecting to socket: %s" % e) sys.exit(1) try: print(skt.send(msg)) print("SEND: %s" % msg) except socket.error, e: print("Error sending data: %s" % e) sys.exit(1) while 1: try: buf = skt.recv(1024) print("RECV: %s" % buf) except socket.error, e: print("Error receiving data: %s" % e) sys.exit(1) if not len(buf): break sys.stdout.write(buf)

    Read the article

  • Need to increase nginx throughput to an upstream unix socket -- linux kernel tuning?

    - by Ben Lee
    I am running an nginx server that acts as a proxy to an upstream unix socket, like this: upstream app_server { server unix:/tmp/app.sock fail_timeout=0; } server { listen ###.###.###.###; server_name whatever.server; root /web/root; try_files $uri @app; location @app { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_redirect off; proxy_pass http://app_server; } } Some app server processes, in turn, pull requests off /tmp/app.sock as they become available. The particular app server in use here is Unicorn, but I don't think that's relevant to this question. The issue is, it just seems that past a certain amount of load, nginx can't get requests through the socket at a fast enough rate. It doesn't matter how many app server processes I set up, it doesn't even matter what the app is (tried it with a dummy app with just a single endpoint that returned an empty page with status 404). The bottleneck seems to be the socket, not the app. I'm getting a flood of these messages in the nginx error log: connect() to unix:/tmp/app.sock failed (11: Resource temporarily unavailable) while connecting to upstream Many requests result in status code 502, and those that don't take a long time to complete. The nginx write queue stat hovers around 1000. Anyway, I feel like I'm missing something obvious here, because this particular configuration of nginx and app server is pretty common, especially with Unicorn (it's the recommended method in fact). Are there any linux kernel options that needs to be set, or something in nginx? Any ideas about how to increase the throughput to the upstream socket? Something that I'm clearly doing wrong? Additional information on the environment: $ uname -a Linux app1 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux $ ruby -v ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux] $ unicorn -v unicorn v4.3.1 $ nginx -V nginx version: nginx/1.2.1 built by gcc 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) TLS SNI support enabled Current kernel tweaks: net.core.rmem_default = 65536 net.core.wmem_default = 65536 net.core.rmem_max = 16777216 net.core.wmem_max = 16777216 net.ipv4.tcp_rmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 65536 16777216 net.ipv4.tcp_mem = 16777216 16777216 16777216 net.ipv4.tcp_window_scaling = 1 net.ipv4.route.flush = 1 net.ipv4.tcp_no_metrics_save = 1 net.ipv4.tcp_moderate_rcvbuf = 1 net.core.somaxconn = 8192 net.netfilter.nf_conntrack_max = 131072

    Read the article

  • Better data stream reading in Haskell

    - by Tim Perry
    I am trying to parse an input stream where the first line tells me how many lines of data there are. I'm ending up with the following code, and it works, but I think there is a better way. Is there? main = do numCases <- getLine proc $ read numCases proc :: Integer -> IO () proc numCases | numCases == 0 = return () | otherwise = do str <- getLine putStrLn $ findNextPalin str proc (numCases - 1) Note: The code solves the Sphere problem https://www.spoj.pl/problems/PALIN/ but I didn't think posting the rest of the code would impact the discussion of what to do here.

    Read the article

  • Camera Stream in Flash Problem

    - by Peter
    Please help me fill the question marks. I want to get a feed from my camera and to pass it to the receive function. Also in flash builder(in design mode) how do I put elements so they can play a camera feed?? Because as it seems VideoDisplay just doesn't work public function receive(???:???):void{ //othercam is a graphic element(VideoDisplay) othercam.??? = ????; } private function send():void{ var mycam:Camera = Camera.getCamera(); //mycam2.attachCamera(mycam); //sendstr is a stream we send sendstr.attachCamera(mycam); //we pass mycam into receive sendstr.send("receive",mycam); }

    Read the article

  • OpenVPN - Ubuntu 10.04 - Client Can't Connect to Server - Linux Route Add Command Failed

    - by nicorellius
    I suppose this could be asked on Server Fault as well, but it is specific to the client so I thought I'd start here. I have keys for access to an OpenVPN server already in place. I have used these keys to connect already, but using a Windows XP machine. On a Ubuntu machine, I installed OpenVPN and then configured client.conf file so that I could run: sudo openvpn --config client.conf And it seems correct but I still can't connect and get these errors and lines of output: Mon May 31 14:34:57 2010 ERROR: Linux route add command failed: external program exited with error status: 7 Mon May 31 14:34:57 2010 /sbin/route add -net 10.8.0.1 netmask 255.255.255.255 gw 10.8.0.17 SIOCADDRT: File exists Mon May 31 14:34:57 2010 ERROR: Linux route add command failed: external program exited with error status: 7 Mon May 31 14:34:57 2010 Initialization Sequence Completed I searched the net for forums and ideas and tried some file moving and renaming but still ended up in the same place.

    Read the article

  • SysAdmin Career Question: Internal or Client Based

    - by Malnizzle
    ServerFault Community, It seems there are two positions SysAdmins find themselves in, either you are working for a non-IT services based single client (your employer) and providing in-house IT support or you work for a company who provides out sourced IT services to multiple clients. Right now I work for a company who does the latter, and I often consider how nice it would be doing the in-house side of things, to just have one network I am focused on and instead of feeling like I have a dozen bosses between clients and internal management, I would just have one set of management and people to appease. There is also the technical aspect of every client wanting something different, and having to manage numerous different technology platforms, or trying to force clients into using the technologies we prefer, neither situation is enjoyable. Is this just "the grass is greener on the other side" syndrome, or is there some legitimacy to the the stress of client based IT work compared to being an in-house IT guy? Thanks!

    Read the article

  • OpenVPN - Ubunut 10.04 - Client Can't Connect to Server - Linux Route Add Command Failed

    - by nicorellius
    I suppose this could be asked on Server Fault as well, but it is specific to the client so I thought I'd start here. I have keys for a OpenVPN server already in place. I have used these keys to connect already, but using a Windows XP machine. I started by building the client.conf file so that I could run: sudo openvpn --config client.conf And it seems correct but I still can't connect and get these errors and lines of output: Mon May 31 14:34:57 2010 ERROR: Linux route add command failed: external program exited with error status: 7 Mon May 31 14:34:57 2010 /sbin/route add -net 10.8.0.1 netmask 255.255.255.255 gw 10.8.0.17 SIOCADDRT: File exists Mon May 31 14:34:57 2010 ERROR: Linux route add command failed: external program exited with error status: 7 Mon May 31 14:34:57 2010 Initialization Sequence Completed I searched the net for forums and ideas and tried some file moving and renaming but still ended up in the same place.

    Read the article

  • Slow Starting DHCP Client Service - HP Thin Clients

    - by Ryan
    We have recently began adding XPe thin clients to our domain in preperation for a new citrix environment. One thing that has been picked up on in testing is that they appear slow to boot. The issue manifest's it's self as the classic "Applying Computer Settings..." screen we are all used to seeing. After digging into the issue it appears the DHCP Client service is taking some time to load on boot, this varies but I would estimate it can take around 1 minute in some cases. I've eliminated the classic issues, DHCP is responding correctly and in quick time. DNS is not the cause and GPO's are applying promptly. A simple workaround is to assign the client a static IP which work's great so the TCP/IP servies are obviously firing up quickly, just not DHCP Client. Does anyone have any idea's on how I may be able to improve the service start time? Keen to find a better solution before I get my arm twisted into setting up 250 thin clients with static addressing!

    Read the article

  • Multiple sendto() using UDP socket

    - by ereOn
    Hi, I have a network software which uses UDP to communicate with other instances of the same program. For different reasons, I must use UDP here. I recently had problems sending huge ammounts of data over UDP and had to implement a fragmentation system to split my messages into small data chunks. So far, it worked well but I now encounter an issue when I have to send a lot of data chunks. I have the following algorithm: Split message into small data chunks (around 1500 bytes) Iterate over the data chunks list and for each, send it using sendto() However, when I send a lot of data chunks, the receiver only gets the first 6 messages. Sometimes it misses the sixth and receives the seventh. It depends. Anyway, sendto() always indicates success. This always happen when I test my software over a loopback interface (127.0.0.1) but never over my LAN network. If I add something like std::cout << "test" << std::endl; between the sendto() then every frame is received. I am aware that UDP allows packet loss and that my frames might be loss for a lot of reasons and I suppose it has to do with the rate I am sending the data chunks at. What would be the right approach here ? Implementing some acknowledgement mechanism (just like TCP) seems overkill. Adding some arbitrary waiting time between the sendto() is ugly and will probably decrease performance. Increasing (if possible) the receiver UDP internal buffer ? I don't even know if this is possible. Something else ? I really need your advices here. Thank very much.

    Read the article

  • What is stopping data flow with .NET 3.5 asynchronous System.Net.Sockets.Socket?

    - by TonyG
    I have a .NET 3.5 client/server socket interface using the asynchronous methods. The client connects to the server and the connection should remain open until the app terminates. The protocol consists of the following pattern: send stx receive ack send data1 receive ack send data2 (repeat 5-6 while more data) receive ack send etx So a single transaction with two datablocks as above would consist of 4 sends from the client. After sending etx the client simply waits for more data to send out, then begins the next transmission with stx. I do not want to break the connection between individual exchanges or after each stx/data/etx payload. Right now, after connection, the client can send the first stx, and get a single ack, but I can't put more data onto the wire after that. Neither side disconnects, the socket is still intact. The client code is seriously abbreviated as follows - I'm following the pattern commonly available in online code samples. private void SendReceive(string data) { // ... SocketAsyncEventArgs completeArgs; completeArgs.Completed += new EventHandler<SocketAsyncEventArgs>(OnSend); clientSocket.SendAsync(completeArgs); // two AutoResetEvents, one for send, one for receive if ( !AutoResetEvent.WaitAll(autoSendReceiveEvents , -1) ) Log("failed"); else Log("success"); // ... } private void OnSend( object sender , SocketAsyncEventArgs e ) { // ... Socket s = e.UserToken as Socket; byte[] receiveBuffer = new byte[ 4096 ]; e.SetBuffer(receiveBuffer , 0 , receiveBuffer.Length); e.Completed += new EventHandler<SocketAsyncEventArgs>(OnReceive); s.ReceiveAsync(e); // ... } private void OnReceive( object sender , SocketAsyncEventArgs e ) {} // ... if ( e.BytesTransferred > 0 ) { Int32 bytesTransferred = e.BytesTransferred; String received = Encoding.ASCII.GetString(e.Buffer , e.Offset , bytesTransferred); dataReceived += received; } autoSendReceiveEvents[ SendOperation ].Set(); // could be moved elsewhere autoSendReceiveEvents[ ReceiveOperation ].Set(); // releases mutexes } The code on the server is very similar except that it receives first and then sends a response - the server is not doing anything (that I can tell) to modify the connection after it sends a response. The problem is that the second time I hit SendReceive in the client, the connection is already in a weird state. Do I need to do something in the client to preserve the SocketAsyncEventArgs, and re-use the same object for the lifetime of the socket/connection? I'm not sure which eventargs object should hang around during the life of the connection or a given exchange. Do I need to do something, or Not do something in the server to ensure it continues to Receive data? The server setup and response processing looks like this: void Start() { // ... listenSocket.Bind(...); listenSocket.Listen(0); StartAccept(null); // note accept as soon as we start. OK? mutex.WaitOne(); } void StartAccept(SocketAsyncEventArgs acceptEventArg) { if ( acceptEventArg == null ) { acceptEventArg = new SocketAsyncEventArgs(); acceptEventArg.Completed += new EventHandler<SocketAsyncEventArgs>(OnAcceptCompleted); } Boolean willRaiseEvent = this.listenSocket.AcceptAsync(acceptEventArg); if ( !willRaiseEvent ) ProcessAccept(acceptEventArg); // ... } private void OnAcceptCompleted( object sender , SocketAsyncEventArgs e ) { ProcessAccept(e); } private void ProcessAccept( SocketAsyncEventArgs e ) { // ... SocketAsyncEventArgs readEventArgs = new SocketAsyncEventArgs(); readEventArgs.SetBuffer(dataBuffer , 0 , Int16.MaxValue); readEventArgs.Completed += new EventHandler<SocketAsyncEventArgs>(OnIOCompleted); readEventArgs.UserToken = e.AcceptSocket; dataReceived = ""; // note server is degraded for single client/thread use // As soon as the client is connected, post a receive to the connection. Boolean willRaiseEvent = e.AcceptSocket.ReceiveAsync(readEventArgs); if ( !willRaiseEvent ) this.ProcessReceive(readEventArgs); // Accept the next connection request. this.StartAccept(e); } private void OnIOCompleted( object sender , SocketAsyncEventArgs e ) { // switch ( e.LastOperation ) case SocketAsyncOperation.Receive: ProcessReceive(e); // similar to client code // operate on dataReceived here case SocketAsyncOperation.Send: ProcessSend(e); // similar to client code } // execute this when a data has been processed into a response (ack, etc) private SendResponseToClient(string response) { // create buffer with response // currentEventArgs has class scope and is re-used currentEventArgs.SetBuffer(sendBuffer , 0 , sendBuffer.Length); Boolean willRaiseEvent = currentClient.SendAsync(currentEventArgs); if ( !willRaiseEvent ) ProcessSend(currentEventArgs); } A .NET trace shows the following when sending ABC\r\n: Socket#7588182::SendAsync() Socket#7588182::SendAsync(True#1) Data from Socket#7588182::FinishOperation(SendAsync) 00000000 : 41 42 43 0D 0A Socket#7588182::ReceiveAsync() Exiting Socket#7588182::ReceiveAsync() - True#1 And it stops there. It looks just like the first send from the client but the server shows no activity. I think that could be info overload for now but I'll be happy to provide more details as required. Thanks!

    Read the article

  • Socket Select with empty fd set

    - by whoi
    Hi; Suppose you have an fd set which can have zero or more sockets in it. When I try to call select operation on empty fd set, what I get is -1 as the number of fds which are set, meaning error. So what would you suggest to overcome this problem, you might say do not call if empty but I have a loop and any time fd set can hold 0 or more sockets. What is the best approach about this problem? (we are on C programming language)

    Read the article

  • Java Socket Disconnect Reporting vs. C# Disconnection

    - by ikurtz
    in C# when a sockets connection is terminated the other node is informed of this before terminating the link thus the remaning node can update the connection status. in Java when i terminate a communication link the other node keeps reporting the connection as valid. do i need to implement a read cycle (makes sense) that reports the connection as lost when it recieves a -1 during read (in C# this is 0 i think)? thank you for your insight. EDIT: thanks to you both. as i suspected and mentioned in my post that an additional check is required to confirm the connected state of a connection.

    Read the article

  • a problem in socket programing in perl

    - by isu
    I write this code : #!/usr/local/bin/perl use strict; use LWP::UserAgent; my $ua = new LWP::UserAgent(agent => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5'); $ua->proxy([qw(http https)] => 'http://203.185.28.228:1080' #that is just socks:port); my $response = $ua->get("http://www.google.com"); print $response->code,' ', $response->message,"\n"; but when i execute it i get this error: 500 Can't connect to 203.185.28.228:1080 (connect: timeout) what am i going to do ?

    Read the article

  • How to handle asynchronous socket receiving in C++?

    - by Overv
    I'm currently using a thread to handle Connect and Send calls asynchronously. This is all working fine, but now I want to make receiving asynchronous too. How should I receive data without pausing the whole queue while waiting for data? The only solution I can think of right now is a second thread.

    Read the article

  • DNS client configuration steps in Oracle Solaris 11

    - by Gurubalan
    This guide covers Quick how to configure DNS client on Solaris 11. DNS client configuration in Solaris 11 is based on SMF service rather than file based. When you configure a system as DNS client, you will be performing the following two configurations. I. DNS client setup II. Configure Name service switch to use DNS I. DNS client setup 1. Configure using SMF service network/dns/client # svccfg -s network/dns/clientsvc:/network/dns/client> setprop config/search = astring: ("test.com" "service.test.com")svc:/network/dns/client> setprop config/nameserver = net_address: (192.168.10.10 192.168.10.11)svc:/network/dns/client> exit 2.  Enable the DNS client service (when you configure it for the first time) #svccfg enable -r dns/client 3. Restart/Refresh DNS client service (It is done when there is any update to the configuration) #svccfg refresh dns/client #svccfg restart dns/client 4. Verify /etc/resolv.conf if it is updated with the changes. # more /etc/resolv.conf ## _AUTOGENERATED_FROM_SMF_V1_## WARNING: THIS FILE GENERATED FROM SMF DATA.#   DO NOT EDIT THIS FILE.  EDITS WILL BE LOST.# See resolv.conf(4) for details.search               test.com service.test.comnameserver      192.168.10.10nameserver      192.168.10.11 --- II.  Configuring Name service switch to use DNS 1. Configure using SMF service  system/name-service/switch # svccfg -s system/name-service/switchsvc:/system/name-service/switch> setprop config/host = astring: "files dns"svc:/system/name-service/switch>exit 2.  Restart/Refresh name-service/switch service #svccfg refresh name-service/switch #svccfg restart  name-service/switch 3. Verfiy host entry in /etc/nsswitch.conf  is updated with dns. # more /etc/nsswitch.conf## _AUTOGENERATED_FROM_SMF_V1_## WARNING: THIS FILE GENERATED FROM SMF DATA.#   DO NOT EDIT THIS FILE.  EDITS WILL BE LOST.# See nsswitch.conf(4) for details.passwd: filesgroup:  fileshosts:  files dnsipnodes:        files dns . --- PS: Thank you ollasi for your motivation behind the screen.

    Read the article

  • Openvpn client-to-client connection reencrypted at Server?

    - by user1684411
    currently i'm using a site-2-site openvpn setup. The routers en/decrypt all traffic that goes from one net to another. One of them is the Openvpn server. This works but performance is not as good as possible. I think the limiting factor is the cpu power of the router. Would it be better if i use client-to-client connections and access the fileserver in the one net from a pc in the other, because the openvpn-server does not have to decrypt the (whole) packets?

    Read the article

  • Disable integrated client certificate validation in IIS7?

    - by danford
    We have an IIS 7 hosted site that requires client certificates (two-way ssl). Unfortunately, I don't have access to the trusted certificate store on the host machines, and so I was forced to write a custom http module to verify the certificates. My module never gets a chance to do the authentication, however, because IIS doesn't recognize the certificates and responds with a 403.7 error. How do I turn off client certificate validation, while still requiring clients to provide them?

    Read the article

  • Intermittent Disconnection of Client Computers from Domain Server

    - by dilip nagle
    The Background: I have Windows 2008 server Enterprise Version with 25 user cal licences. It has a domain and all users and a network shared HP printer in it. The Server has two network cards and both these cards as well as all client machines are on IP addressing scheme of 192.168.1.* with subnetmask 255.255.255.0. Of the two network cards viz. 192.168.1.231 and 192.168.1.233, only 192.168.1.231 is registered with DNS. In 192.168.1.233(i.e. 2nd network card) has default getway as 192.168.1.231 and dns address as 192.168.1.231. The Server has three hard disks with capacities as 500gb, 500gb and 1TB and are partitioned as (C,D,E), (F,G) and (K) with partition K having all user data into various Shared Folders. Each of these folders(On Partition K), are mapped onto each user's computer as per the right of access given to them. The Problem: The Server was installed about 6 months ago and till date not even once, the Server has Hung or has given any problem. All the Clients computers are able to run the web based software from their computers via ip address, e.g. http://192.168.1.231/webERP/default.aspx. However, occassionally, when any client computer tries to browse network mappings, it hangs. Again, there is no fixed pattern. This may happen after running smoothly for say 3 days. On each Client's machine, the network settings are as follows: IP Address: 192.168.1.* where * is 1,2,3 .... Sunnetmask: 255.255.255.0 defauly getway: 192.168.1.231 Which is a server card and DNS address. preferred DNS Server: 192.168.1.231 In Advanced Tab under Wins: LMHostLookup is Unticked and default is radio buttoned. Ideally, I would have loved to have Disabled NETBIOS over TCP/IP but some network printers do not get accessed if this option is enabled(ie. Radio Buttoned). Bacause Disabling Netbios will drastically reduce traffic of NETBIOS broadcasting to all the computers on the net to do naming resolution. On Server, I have WINs Running which I have Scavanged Records, verified Database Integrity etc, removed Tombstoned Records etc. The Critical Errors shown only once a day when the server is statred are 4224(WINS) and 12923 - Server Licencing failed to Update DNS Record. I fail to understand as why do client machines HANG when they try to browse mapped network shared folders on K Drive. Kindly Advice

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >