//
//
// YesNoOption
//
//

#include "YesNoOptions.h"

void
YesNoOption::NegotiateOption (unsigned char command)
{
	unsigned char buff[3];
	
	buff[0] = IAC;
	switch (command) {
		case DO:
			buff[1] = WILL;
			break;
		case DONT:
			buff[1] = WONT;
			break;
		case WILL:
			buff[1] = DO;
			break;
		case WONT:
			buff[1] = DONT;
			break;
		default:
			buff[1] = WONT;
			break;
	}	
	buff[2] = option;

	SendReply (buff, 3);
	stream->MarkAsRead ();
}

