Move the xmpp library to its new name.

This commit is contained in:
Ralph Giles
2005-06-14 14:10:31 +00:00
commit f27235b862
38 changed files with 6846 additions and 0 deletions

42
src/sock.h Normal file
View File

@@ -0,0 +1,42 @@
/* sock.h
** XMPP client library -- socket abstraction header
**
** Copyright (C) 2005 OGG, LCC. All rights reserved.
**
** This software is provided AS-IS with no warranty, either express
** or implied.
**
** This software is distributed under license and may not be copied,
** modified or distributed except as expressly authorized under the
** terms of the license contained in the file LICENSE.txt in this
** distribution.
*/
#ifndef __LIBXMPP_SOCK_H__
#define __LIBXMPP_SOCK_H__
#include <stdio.h>
#ifndef _WIN32
typedef int sock_t;
#else
typedef SOCKET sock_t;
#endif
void sock_initialize(void);
void sock_shutdown(void);
int sock_error(void);
sock_t sock_connect(const char * const host, const unsigned int port);
int sock_close(const sock_t sock);
int sock_set_blocking(const sock_t sock);
int sock_set_nonblocking(const sock_t sock);
int sock_read(const sock_t sock, void * const buff, const size_t len);
int sock_write(const sock_t sock, const void * const buff, const size_t len);
int sock_is_recoverable(const int error);
/* checks for an error after connect, return 0 if connect successful */
int sock_connect_error(const sock_t sock);
#endif /* __LIBXMPP_SOCK_H__ */