Server, and I get that on server always, For client as I don't have the code don't know what happens! Thanks,
nahitan
Posts
-
TCP IP socket goes up and down -
TCP IP socket goes up and downThanks for reply, here are some error logs I get: StoreError API Socket, WSAECONNRESET Closing socket due to error, Socket index = 0 API Socket, Socket is null. SocketIndex -1 generates invalid socket Server, socket link not found API Socket, Connection accepted from 192.168.0.51 all happens in 1-2 seconds the code is so big can't post in here. Thanks, Nahitan
-
TCP IP socket goes up and downHi there, I have a C++ application on Windows based machine connecting to another Windows based application within a shared network (both servers connected to same firewall router)via TCP socket but time to time the socket goes up and down many times (80- 90 times a day) for couple of seconds I ran ping from both servers to ping each other and there is no problem with the ping, the two application send and receive many messages per second so there is not a single second with no inactivity between the two app. anybody can tell me what could be done to reduce the socket disconnection? One socket is forced to be server and listen on a specified IP and port and the other one is forced to connect as client to the same IP and port. Any suggestion is appreciated. Thanks, Nahitan
-
How to decide if GPRS service is down in a C++ application (UDP socket)Thanks for your reply, I might not explained it properly but having all the devices send fast heartbeat means a lot of data traffic and pay for that and when you have like 1000 device and want to pay more than 5M per month or something like $15/month for GPRS usage is not acceptable by customers. so fast heartbeat is not a solution. I was/ am looking for a better way of examining the healthiness of the GPRS data trafic through UDP socket. Thanks for ideas in advanced. Nahitan
-
How to decide if GPRS service is down in a C++ application (UDP socket)Hi there, I have an application that uses UDP socket to exchange packets with some mobile devices (we have modem and SIM cards in these devices and use UDP socket to connect to the C++ application). the application also has a TCS socket that connects to a server that connects to the same mobile device through radio system. Here we try to send some messages to the devices using GPRS and if it failed to go out (no ACK was sent from the device) we retransmit message through radio. my question is that I need to know if the GPRS system is down or not and if it is down I do not try GPRS first and wait for ACK to come back (delay in messaging). please note that we have heart beat from devices to the application every 45 minutes so I can't use heartbeat as an indicator of GPRS being down. also in slow time of the day (midnight to 5:00 am there is not much trafic between the devices and application. what is the best way here to decide if GPRS is down? Thanks for help, Nahitan
-
UDP socket and GPRSI can communicate with the application to the mobile device fine. My problem is that the port gets changed time to time and I was wondering if anybody knows where a port gets assigned in GPRS for a UDP socket. Thanks,
-
UDP socket and GPRSto maintain a port you need to send a ping every 45 seconds that is a lot of data and if you have 2000 devices, that would be a big number. I am just wondering where a port gets assigned. Thanks,
-
UDP socket and GPRSI am not sure when we use an UDP socket to send and receive messages from one windows application to a mobile device that uses a modem and SIM card, where a port be assigned to an IP. say I have a SIM card with fix IP xxx.xxx.xxx.xxx, when I send a message I get it in my Windows base app as coming from that IP and a big port number (i.e. 48618). The SIM card provider suggests that they don't assign any port number to a SIM card. the thing is that after a while the port number gets changed if there is no traffic and My application can't send a message to the device as I send to the IP and the port that I got the last message from. Best, Nahita
-
UDP socket and IP: Port [modified]Good point, but what if the PC restarts for any reason (windows crash, power...)
-
UDP socket and IP: Port [modified]Hi there, I have an application that sits between mobile devices and another application. I use UDP socket from mobile devices (GPRS network the device uses a modem and SIM card) to my application and TCP from my application to the second application. the mobile device is supposed to send a message to my app and from my app to the 2nd application and the second application sends a response back to that specific device via my application. So I record mobile id and IP and port that I got the message from and save it in a memory to use it for response back to the device. the problem is when my application crashes, I lose all the IP and port information and the message that should go to the mobile device would not get it there until I get a message from the mobile and save the info. I tried to save all the info in a file and read it back in start up but I noticed that when I restart my application the port number for the specified device will change and the information that I saved is useless (i.e. I am sending a message to an IP (which is correct) and a port (that has changed)). My question is like this: is there anyway to use UDP sockets and send/ receive messages but just use a specific IP for each device and do not use any PORT? and if there is, I'll be appreciated if somebody get me a clue. here is what happens for me now: Device to App: got a message: look for device ID and save the IP and PORT for that: Mobile# Z, IP: xxx.xxx.xxx.xxx port: xxxx App to Device Message is supposed to go to device Z --> get the IP and Port send message to xxx.xxx.xxx.xxx port xxxx if My app restarts and I get a message to send to device Z, the port is changed and the message never gets to that unless I get a message from the device and update my information. Due to data usage and as we use VPN tunnel we send heartbeat message every 40 minutes, so the information might not be very updated. Best Nahitan
modified on Wednesday, December 10, 2008 3:53 PM
-
UDP socketThanks for the reply, The problem is that we have some wireless mobile devices that are talking to a windows application via UDP sockets using SIM card (GPRS), sometimes the mobile device can not send any message to the application and the application does not know if the socket is down or not! I need to get notified in my application about the network issue (socket disconnection...) thanks,
-
checking the current time in C++Thanks a lot, worked perfectly! Thanks thanks thanks,
-
UDP socketHi there, I working on an application that uses UDP socket to transfer data, how can I make sure if there is a connection problem? for TCP I get socket connection errors but for UDP, I do not get any error and I need a way to make sure the connection is up or be notified that there is no connection. Regards,
-
checking the current time in C++I can't figure out what to do. I changed the code to: time_t mt; time(&mt); tm *now; now = localtime(&mt); if (now->tm_hour==16){LogError("AClass","BProcess","Hour is 4 pm");} I still get the same error message Without these 5 lines of code, I do not get any error. I even took out the if statement and I still get the error! :confused:
-
checking the current time in C++Thank you very much for your help. When I added your code in my application and when I compile it I get: time_t mt; time(&mt); tm *now; now = localtime(&mt); LogError("ClassA","IClass","jjjjjjjhour=%tm", now->tm_hour); Error executing c:\windows\system32\cmd.exe. Class.dll - 1 error(s), 0 warning(s) Thanks,
-
checking the current time in C++hi there, Could anybody please help me in this: I need to check the current time in my application after each message that my application receives and whenever it is midnight I reset a counter inside my program. I appreciate any ideas Thanks, Nahitan
-
TIme checking in C++ for visual 6Thanks for the tip, but as I am new in this area, I am not sure how to check for the time in my application. like if time (00:00:00 set counter to zero)... Regards,
-
TIme checking in C++ for visual 6Hi there, I have an application that sends/ receives messages via sockets and logs all the messages for future inquiry. I need to check a particular message and count the number of message I received every day. SO I need a timer that resets everyday (say 00:00:00) and restart the timer. I appreciate any ideas Thanks,
-
send a text message to a cell phone from an applicationHi there, I am working on a system that sends receive messages via TCP sockets and I need to have a way to inform a service person if the link is down from one application to the other by sending a text message (email, SMS). The application that sends and recive messages in writen in C++ but I am not sure how I can add this feature to it. Also I was thinking if I could have a second application that would watch the first one for connection integrity. Could anyone please give me some help (any tutorial, code sample...) I appreciate any help.
-
how to close .exe file in process list in task managerthanks for the help I think it is good to check the task manager's process list and if multiple copy of the program are running kill it and reopen it. regards,