So far as I know, I've set up my nonblocking socket properly, but it still seems to block...or at least when I debug it in VStudio, it never gets to the next line of code while in:
ntdll.dll!_KiFastSystemCallRet@0()
ntdll.dll!_NtDeviceIoControlFile@40() + 0xc bytes
mswsock.dll!_WSPRecv@36() + 0xd1 bytes
ws2_32.dll!_recv@16() + 0x6f bytes
ogrey2.exe!MJClient::read() Line 152 + 0x31 bytes
Do you see anything wrong? When I write a toy program just using this code, it seems to read along happily (without the server sending anything)...is there any kind of error or timeout state that would cause it to block?

Code:
class MJClient{
protected:
	int32_t sockfd;
	//struct sockaddr_in stSockAddr;
	addrinfo *res;

	int circlefront, circleend;
	char circlebuffer[CIRCLE_SIZE+1];
	char buffer[CIRCLE_SIZE+1];//convert to circle later
	char** messages;//[MSG_MAX][MSG_SIZE];
	//queue<string> messages;
	int firstmsg;
	int lastmsg;
	char cantread;
	int sock_type;
public:
	~MJClient()
	{
		for(int i=0; i<MSG_MAX; i++)
			delete[] messages[i];
		delete[] messages;
	}
	int setup(const char* addr="127.0.0.1")
	{
		printf("Connecting\n");

		WORD wVersionRequested = MAKEWORD(2, 2);
		WSADATA wsaData;
		WSAStartup(wVersionRequested, &wsaData);
		sockfd = socket(PF_INET, sock_type, 0);
		printf("Error %i\n", WSAGetLastError());
		if(-1 == sockfd)
		{
			printf("cannot create socket");
			exit(-1);
		}


		addrinfo hints;
		memset(&hints, 0, sizeof(hints));
		hints.ai_family = PF_UNSPEC;
		hints.ai_socktype = sock_type;

		if(getaddrinfo(addr, "1303", &hints, &res))
			printf("Invalid address");
		if(connectMe())
			exit(0);
		
		u_long on = 1;
		if(0!=ioctlsocket(sockfd, FIONBIO, & on))
		{
			//Something went wrong
			printf("Failed to put socket into asynchronous mode\n");
		}

		messages=new char*[MSG_MAX];
		for(int i=0; i<MSG_MAX; i++)
			messages[i] = new char[MSG_SIZE];
		circlefront = 0;
		circleend = 0;
		return 0;
	}
	void read()
	{
		
		int bytesread=recv(sockfd, buffer+circleend, CIRCLE_SIZE-circleend-1, 0);
		if(bytesread<0)//NEVER GETS HERE
		{
			int error = WSAGetLastError();
			if(error!=WSAEWOULDBLOCK)
				printf("WSA Error %i", WSAGetLastError());
			return;
		}
        //NEVER GETS THIS FAR
     }
};

class TCPClient:public MJClient
{
protected:
	int connectMe()
	{
		int err = connect(sockfd,(struct sockaddr*) res->ai_addr, sizeof(*(res->ai_addr)));
		if(err==-1)
		{
			printf("connect failed %i\n", err);
			err = WSAGetLastError();
			printf("socket fd %i stoSockAddrlen %i\n", sockfd, sizeof(*(res->ai_addr))); 
		}
		return err;
	};
public:
	TCPClient()
	{
		sock_type = SOCK_STREAM;
	}
//Other stuff
};