 my_port, my_guid, nickname=None):

        self._peers = {}
        self._callbacks = defaultdict(list)
        self._timeouts = []
        self._port = my_port
        self._ip = my_ip
        self._guid = my_guid<commit_msg>Close sockets after messages sent<commit_after>import json
import logging
from collections import defaultdict
import traceback
from multiprocessing import Process, Queue
from threading import Thread
from random import randint

from zmq.eventloop import ioloop, zmqstream
import zmq

ioloop.install()
import tornado
import zlib
from protocol import goodbye, hello_request
import network_util
from urlparse import urlparse
import sys, time, random
from ws import ProtocolHandler
from pprint import pformat


class PeerConnection(object):
    def __init__(self, transport, address):
        # timeout in seconds
        self._timeout = 10
        self._transport = transport
        self._address = address
        self._nickname = ""
        self._responses_received = {}
        self._log = logging.getLogger('[%s] %s' % (self._transport._market_id, self.__class__.__name__))
        self.create_socket()

    def create_socket(self):
        self._log.info('Creating Socket')
        self._ctx = zmq.Context()
        self._socket = self._ctx.socket(zmq.REQ)
        self._socket.setsockopt(zmq.LINGER, 0)
        # self._socket.setsockopt(zmq.SOCKS_PROXY, "127.0.0.1:9051");

    def cleanup_socket(self):
        self._ctx.destroy()


    def send(self, data, callback):
        self.send_raw(json.dumps(data), callback)

    def send_raw(self, serialized, callback=lambda msg: None):

        compressed_data = zlib.compress(serialized,9)

        try:
            self._socket = self._ctx.socket(zmq.REQ)
            self._socket.connect(self._address)
            self._stream = zmqstream.ZMQStream(self._socket, io_loop=ioloop.IOLoop.current())

            self._stream.send(compressed_data)

            def cb(msg):
                response = json.loads(msg[0])
                self._log.debug('[send_raw] %s' % pformat(response))

                # Update active peer info

                if response.has_key('senderNick') and response['senderNick']!= self._nickname:
                    self._nickname = response['senderNick']

                if callback is not None:
                    self._log.debug('%s' % msg)
                    callback(msg)

                self._stream.close(0)
                self._socket.close(0)

            self._stream.on_recv(cb)

        except Exception,e :
            self._log.error(e)



# Transport layer manages a list of peers
class TransportLayer(object):
    def __init__(self, market_id, my_ip, my_port, my_guid, nickname=None):

        self._peers = {}
        self._callbacks = defaultdict(list)
        self._timeouts = []
        self._port = my_port
        self._ip = my_ip
        self._guid = my_guidI just finished reading the book "Tarzan of the Apes" by Edgar Rice Burroughs, after Phil and Rick Cortes recommended it. I always meant to before, but just never got round to it.
I have to admit that I was a little surprised at how different it is to any movie or TV version.
I actually did this about a month before I read the book, but (with a few minor misgivings) I still think it's a pretty faithful representation. I'm glad I gave him the hunting knife, 'cause it turns out that's pretty important to the story - lucky fluke, I just saw it in a J Allen St John illustration, and kind of liked it.
The left foot is a tad wonky.
i really like the facial expression. i think the foot would be fine if it were pointing more outward. nice one em.
The toes are all wrong, though - I'm not much cop at drawing bare feet.
I like the look, the facial expression and the work on the muscles. But I agree with bigg about the feet, wich distort the leg.
I agree. The position's fine. It's just a scale issue... the lower leg needs to be bigger, or it needs clearer foreshortening. As it is, it looks too short in relation to the foot.
i really like the pic. about the foot- i think it might be the lack of an ankle that's causing the trouble. i can see that you intended for one, but it needs to be more pronounced, i think. i run into the same trouble with my own drawings. In this angle i think the heel would be slightly visible behind the ankle, in which case the "big toe" should be at a little of a different angle. That's about it from my point of view. The expression is great!
i am- the Urban Hermit.
On the technical side I can't add anything to whats been said. Except to say foreshortening can be an ARSE, the number of times I almost gone crazy dealing with foreshortening issues is countless.
I love his expression, the eyes are so piercing, his face keeps pulling me back in to that area of the page. Nice work.
Excellent--and the foreleg doesn't look too short to me. It's just that his heel is too high up. Erase that bit of heel sticking out, and it'll look good.
Great definition on the muscles--and perfect facial expression!
I felt pretty good so long as I kept my HR down below 170ish (my range should be 146-168 if I remember correctly). When my quads starting to ache, I backed off a little on the cadence. UCAN Superstarch also helped a lot, though I am curious to see what level is REALLY needed. I used two scoops every 50 miles along with Biosteel's High Performance Sports Drink.

It's hard for me to compare directly, but I'll try. I've only bonked once, a couple years ago, somewhere between 25-35 miles. Pre-keto, I really didn't go beyond 20-25 miles that regularly and really needed to pound the carb gels and so forth. This really gave me that extra bit sustained power without needed to re-fuel, which still amazes me.DAS Outdoors
Sports & Leisure / Sports & Leisure
DAS Outdoors
34 Bryn Gwyrdd,
Colomendy Industrial Estate
Denbigh
LL16 5TA
United Kingdom
Tel. 01745 814978
Joined Oct 2018
Back to Members Directory
Imagine a future where you can put your family first.
Spend even more time with them and at the same time, do work that you're extremely passionate about.
Without compromise!
That's our mission and why founders, Mick and Jan Brady, jacked in their careers as a teacher and florist way back in 1988.
To have more flexibility, more independence and to give Paul and Rich, their two sons a wonderful childhood.Can we help your family?
There's not a lot we can do for your work life balance, unless you end up as one of the team of course, but we want to help you spend even more time outside with the people that you love.
DAS Outdoors has evolved from the traditional army surplus business that Mick and Jan started in 1988.
We are now the UK's leading provider of parachute shelters.
We make fantastic outdoor shelters from re-purposed military parachutes, right here in Wales, and we hope you'll have a great time underneath one.
Our goal is to help 1 million families get outside and spend even more time and have even more fun together under our parachutes shelters.
We've even got a whole wall in the office dedicated to it!
We launched the campaign in April 2018 and already helped over 2000 families have more fun outside.
The flight from Baku to Moscow was forced to emergency landing in the Volgograd airport, according to the press officer of the airport Anastasia Golodova.
The situation happened at 7:44 a.m. local time (6:44 a.m. Moscow time). The reason for the emergency landing was poor health of a passenger. The passenger was removed from the flight and taken to the hospital.
By Amy Shipley
Washington Post Staff Writer
Tuesday, February 7, 2006; E01
U.S. figure skater Johnny Weir has contemplated dyeing his hair blue and decorating himself with feathers to capture the essence of his music. He has worn crimson streaks in his hair, a massive sequined broken heart on his chest, sheer purple fabric, off-the-shoulder necklines.
At the mid-January U.S.