Thank you for your answer but I don't want to use crontab because I'm planning to add some more functionalities like to get the results of the scripts and send them in a proper format to server...
Type: Posts; User: netpumber
Thank you for your answer but I don't want to use crontab because I'm planning to add some more functionalities like to get the results of the scripts and send them in a proper format to server...
Hello out there.
I'm interested of building an app that will read from a .txt file such the below one, a list of commands (mainly bash scripts), run them at the specified intervals and get their...
You are right. That was the mistake. Thank you very much and sorry for the extra numbers. I ll take it in mind in the next post.
Hi.
I'm having this simple C code for a server and client. What server does is to send a message to the client when is connected. The thing is that when client disconnects server socket cannot...
Hi.
I know that actually is not a C coding thread but i didn't know where to post it.
I found this interesting article on the net followed by a video showing a method for pixel coding. Maybe...
I change my code for the server side to this but now i'm getting an error for the accept().
That error occurs when you close the listening socket but i cannot see somewhere something like that...
Should the server be as in the man page ? I realized that there are no accept() function in that example. Is that possible ?
in man pages says:
So, with that method it accepts connections...
Thank you very much for the info. I ll take a look at it.
Hello!
I'm trying to create now a client that will support both IPv6 and IPv4 addresses. So as you can see with bold, i used these if clauses with inet_pton() function because as i read in man...
Thank you very much for your explanation. Very helpful.
Thank you very much for your answer, but can you explain what that line of code does ?
&((struct sockaddr_in *)res->ai_addr)->sin_addr
Does it cast addrinfo struct into sockaddr_in struct ?
Hi.
I have this code above:
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
Thank you!
Hello. i'm trying to compile that code above but i'm getting an error for the second parameter of the function.
serverlib.c
#include "serverlib.h"
#include <stdio.h>
#include <stdlib.h>...
Actually i want to make a monitor service.
Where in server side i will have a list with ips/hostnames , and on what interval time has been given it will send to the client a specific message.
...
Hello.
i want to write a server and a client as below:
The server(and not the clients) will connect to the clients and just send a message. The idea is to be able to connect at each client a...
I tried this and it seems that works but it needs some changes i believe.
int main()
{
HANDLE stdinInput = 0;
DWORD numEvents = 0;
DWORD numEventsRead = 0;
Hello.
Here is a little code that i wrote with using Pdcurses library.
int main()
{
WINDOW *pad;
WINDOW *input_window;
So here is the code of the client.
#include <WinSock2.h>
#include <stdio.h>
#include <time.h>
So here is the Last version of the program that reads data from the console.
#include <stdio.h>
#include <Windows.h>
main()
First of all let's clean something..
After our first discussion , the way i thought , that my problem will be solved was reading the stdin and put it in a buffer which then i ll use with send(). ...
Nice.. so i ve change my code and this is how it looks like now
#include <stdio.h>
#include <Windows.h>
main()
Can't understand.. even now , the program seems not working. And thats why i used GetLastError()
#include <stdio.h>
#include <Windows.h>
main()
{
i wrote this code to test it using and the PeekConsoleInput function but doesn't work as expected
#include <stdio.h>
#include <Windows.h>
main()
{
HANDLE stdinInput;
int numEvents = 0;
int numEventsRead = 0;
int i;
for( ; ; )
{
GetNumberOfConsoleInputEvents(stdinInput, &numEvents);