~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
/* 
2
**  Virtual I/O library
3
**  Written by Andrei Errapart <andreie@no.spam.ee>
4
*/
5
6
#include	"all.h"
7
8
#include	<sys/types.h>
9
#include	<sys/stat.h>
10
#include	<stdio.h>
11
12
#include	<string.h>
13
14
VIO_NS_USING;
15
16
int
17
main(	int	argc,
18
	char**	argv)
19
{
20
	VioFd*	fs = 0;
21
	VioSocket*	ss = 0;
22
	int		fd = -1;
23
	char*		hh = "hshshsh\n";
24
25
	fd = open("/dev/tty", O_WRONLY);
26
	if (fd<0)
27
	{
28
		perror("open");
29
		return 1;
30
	}
31
	fs = new VioFd(fd);
32
	ss = new VioSocket(fd);
33
	if (fs->write(hh,strlen(hh)) < 0)
34
		perror("write");
35
	ss->write(hh,strlen(hh));
36
	printf("peer_name:%s\n", ss->peer_name());
37
	printf("cipher_description:%s\n", ss->cipher_description());
38
	delete fs;
39
	delete ss;
40
51.3.7 by Jay Pipes
Final removal of DBUG from vio/ & Round 1 cleanup of include/
41
	return(0);
1 by brian
clean slate
42
}
43