Sponsored Content
Top Forums Programming Serialization of a char buffer Post 302712655 by chercheur857 on Tuesday 9th of October 2012 12:28:30 PM
Old 10-09-2012
My problème is: i have written a client and a server in C, the client send a char to the server (for example "A") the server increments and send the char "B" to the client etc...

i'd like to:
save the last char received by the client and by the server , for a new connection between them they get the char fom file and continue

is that possible ?
 

8 More Discussions You Might Find Interesting

1. Programming

How to achieve Serialization in Unix C, C++

How to achieve SERIALIZATION in Unix , C, C++ Write Objects directly to disk and read back ? (1 Reply)
Discussion started by: Sivaswami
1 Replies

2. Shell Programming and Scripting

How to replace any char with newline char.

Hi, How to replace any character in a file with a newline character using sed .. Ex: To replace ',' with newline Input: abcd,efgh,ijkl,mnop Output: abcd efgh ijkl mnop Thnx in advance. Regards, Sasidhar (5 Replies)
Discussion started by: mightysam
5 Replies

3. Programming

Adding a single char to a char pointer.

Hello, I'm trying to write a method which will return the extension of a file given the file's name, e.g. test.txt should return txt. I'm using C so am limited to char pointers and arrays. Here is the code as I have it: char* getext(char *file) { char *extension; int i, j;... (5 Replies)
Discussion started by: pallak7
5 Replies

4. Programming

concat const char * with char *

hello everybody! i have aproblem! i dont know how to concatenate const char* with char const char *buffer; char *b; sprintf(b,"result.txt"); strcat(buffer,b); thanx in advance (4 Replies)
Discussion started by: nicos
4 Replies

5. Shell Programming and Scripting

how first char in odd line and second char in even line

Hi I m having ifconfig -a o/p like sbanlab1:ksh# ifconfig -a | egrep "flags|inet" | awk -F' ' '{print $1,$2}' lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> inet 127.0.0.1 lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> inet 127.0.0.1 bge0:... (1 Reply)
Discussion started by: tarunn.dubeyy
1 Replies

6. Programming

error: invalid conversion from ‘const char*’ to ‘char*’

Compiling xpp (The X Printing Panel) on SL6 (RHEL6 essentially): xpp.cxx: In constructor ‘printFiles::printFiles(int, char**, int&)’: xpp.cxx:200: error: invalid conversion from ‘const char*’ to ‘char*’ The same error with all c++ constructors - gcc 4.4.4. If anyone can throw any light on... (8 Replies)
Discussion started by: GSO
8 Replies

7. Programming

Special char in a buffer

Hello, Please ,how can verify, if a case of buffer contains a special char ? (in C) Thank you. (3 Replies)
Discussion started by: chercheur857
3 Replies

8. Programming

Invalid conversion from char* to char

Pointers are seeming to get the best of me and I get that error in my program. Here is the code #include <stdio.h> #include <stdlib.h> #include <string.h> #define REPORTHEADING1 " Employee Pay Hours Gross Tax Net\n" #define REPORTHEADING2 " Name ... (1 Reply)
Discussion started by: Plum
1 Replies
sasl_server_start(10 July 2001) 										   sasl_server_start(10 July 2001)

NAME
sasl_server_start - Begin an authentication negotiation SYNOPSIS
#include <sasl/sasl.h> int sasl_server_start(sasl_conn_t * conn, const char * mech, const char * clientin, unsigned * clientinlen, const char ** serverout, unsigned * serveroutlen); DESCRIPTION
sasl_server_start() begins the authentication with the mechanism specified with mech. This fails if the mechanism is not supported. SASL_OK is returned if the authentication is complete and the user is authenticated. SASL_CONTINUE is returned if one or more steps are still required in the authentication. All other return values indicate failure. conn is the SASL context for this connection mech is the mechanism name that the client requested clientin is the client initial response, NULL if the protocol lacks support for client-send-first or if the other end did not have an ini- tial send. Note that no initial client send is distinct from an initial send of a null string, and the protocol MUST account for this dif- ference. clientinlen is the length of initial response serverout is created by the plugin library. It is the initial server response to send to the client. This is allocated/freed by the library and it is the job of the client to send it over the network to the server. Also protocol specific encoding (such as base64 encoding) must needs to be done by the server. serveroutlen is set to the length of initial server challenge RETURN VALUE
sasl_server_start returns an integer which corresponds to one of the SASL errorcodes. SASL_OK indicates that authentication is completed successfully. SASL_CONTINUE indicates success and that there are more steps needed in the authentication. All other return codes indicate errors and should either be handled or the authentication session should be quit. CONFORMING TO
RFC 2222 SEE ALSO
sasl(3), sasl_errors(3), sasl_server_init(3), sasl_server_new(3), sasl_server_step(3) SASL man pages SASL sasl_server_start(10 July 2001)
All times are GMT -4. The time now is 12:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy