/* This function is called when user wants to close the socket.  */
static int winc1500_put(struct net_context *context)
/* This function is called when user wants to close the socket.  */
static int winc1500_put(struct net_context *context)
{
	SOCKET sock = (int) context->offload_context;
	struct socket_data *sd = &w1500_data.socket_data[sock];
	int ret;
	memset(&(context->remote), 0, sizeof(struct sockaddr_in));
	context->flags &= ~NET_CONTEXT_REMOTE_ADDR_SET;
	ret = winc1500_close(sock);
	net_pkt_unref(sd->rx_pkt);
	memset(sd, 0, sizeof(struct socket_data));
	return ret;
}