Testing oplossing

This commit is contained in:
Thulinma 2011-01-17 14:30:11 +01:00
parent 1413e40dd3
commit 71efc65684
3 changed files with 13 additions and 7 deletions

View file

@ -38,12 +38,14 @@ class user{
int MyBuffer_len;
int MyNum;
int currsend;
bool gotproperaudio;
void * lastpointer;
static int UserCount;
int s;
user(int fd){
s = fd;
MyNum = UserCount++;
gotproperaudio = false;
std::cout << "User " << MyNum << " connected" << std::endl;
}//constructor
void Disconnect(std::string reason) {
@ -64,6 +66,7 @@ class user{
return (currsend == todo);
}
void Send(buffer ** ringbuf, int buffers){
//TODO: Bij MP3: gotproperaudio - if false, stuur alleen als eerste byte is 0xFF en set op true
//not connected? cancel
if (s < 0){return;}
//still waiting for next buffer? check it