1
#ifndef QRK_CONNECTION_UTILS_H
2
#define QRK_CONNECTION_UTILS_H
6
\brief Connection ��p�����⏕��
8
\author Satofumi KAMIMURA
10
$Id: ConnectionUtils.h 1408 2009-10-14 20:55:13Z satofumi $
18
\brief Quick Robot Develoment Kit.
26
\brief ���s�R�[�h����Ԃ�
28
\retval true LF, CR �̂Ƃ�
29
\retval false ��L�ȊO�̂Ƃ�
31
extern bool isLF(const char ch);
35
\brief ��M�f�[�^��ǂݔ��
37
Connection::clear() �Ƃ́A�^�C���A�E�g���Ԃ��w�肵�ēǂݔ����_���قȂ�
39
\param[in,out] con �ʐM���\�[�X
40
\param[in] total_timeout �^�C���A�E�g���Ԃ̏�� [msec]
41
\param[in] each_timeout ��M�f�[�^�Ԃɂ�����^�C���A�E�g���Ԃ̏�� [msec]
43
extern void skip(Connection* con, int total_timeout, int each_timeout = 0);
47
\brief ���s�܂ł̃f�[�^�ǂݏo��
49
������I�[�� \\0 ��t�����ĕԂ�
51
\param[in,out] con �ʐM���\�[�X
52
\param[out] buf ��M�o�b�t�@
53
\param[in] count ��M�o�b�t�@�̍ő�T�C�Y
54
\param[in] timeout �^�C���A�E�g [msec]
56
\return ��M������ (��M���Ȃ��ă^�C���A�E�g�����ꍇ�� -1)
58
extern int readline(Connection* con, char* buf, const size_t count,
63
\brief �ڑ��I�u�W�F�N�g�̌���
65
a �� b �̐ڑ��I�u�W�F�N�g����������B
68
void swapConnection(T& a, T& b)
70
Connection* t = a.connection();
71
a.setConnection(b.connection());
76
#endif /* !QRK_CONNECTION_UTILS_H */