ต้องการเขียน Bittorrent-Client โดย Python แบบง่ายๆ

  • warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 1001 is not allowed to access /tmp owned by uid 0 in /var/www/sites/sugree/codenone.com/subdomains/www/html/includes/file.inc on line 190.
  • warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 1001 is not allowed to access /tmp owned by uid 0 in /var/www/sites/sugree/codenone.com/subdomains/www/html/includes/file.inc on line 190.

ใครพอจะแนะนำได้บ้างว่าทำไงคับ ตอนนี้ผมก็ติดต่อกับ peer ได้แล้ว รับข้อมูลจาก peer มาแต่ไม่รู้จะเก็บ ข้อมูลยังไงดี ต้องการคนแนะนำคับ

ใช้ twisted หรือเปล่าครับ

sugree's picture

ก็เขียนลงไฟล์

มีเมลป่าวคับ ขอเมลไว้ปรึกษาได้ป่าวคับ

sugree's picture

ผมว่าถามตรงนี้ดีกว่า จะได้ช่วยกันตอบ

ใช้ twisted มันจะยากป่าวคับ ต้องการแค่ให้ download/upload ได้พอคับ

แล้วก็แนะนำวิธีการเขียนลงไฟล์หน่อยคับ เพราะข้อมูลที่ได้มาก็จะเป็นแบบสุ่มๆ จะให้เขียนลงยังดีคับ

sugree's picture
fd = open('xxx.avi', 'wb')
fd.seek(offset)
fd.write(buffer)
fd.close()

ย้าย Codenone

ประกาศย้าย Codenone ไปใช้ Forum ของ Blognone แทนครับ ตามไปตั้งกระทู้ต่อได้ที่ Codenone Forum (รายละเอียดอ่านจากกระทู้ ย้าย Codenone ไปรวมกับ Blognone)

กระทู้เก่าๆ จะย้ายตามไปในภายหลัง ตอนนี้ปิดการโพสต์กระทู้ไว้ เหลือไว้เฉพาะอ้างอิงเท่านั้น