Back to top

ใครทราบช่วยหน่อยน่ะค่ะ socket programming on linux

Error message

  • Notice: Undefined offset: 1085 in user_node_load() (line 3694 of /usr/share/drupal7/modules/user/user.module).
  • Notice: Trying to get property 'name' of non-object in user_node_load() (line 3694 of /usr/share/drupal7/modules/user/user.module).
  • Notice: Undefined offset: 1085 in user_node_load() (line 3695 of /usr/share/drupal7/modules/user/user.module).
  • Notice: Trying to get property 'picture' of non-object in user_node_load() (line 3695 of /usr/share/drupal7/modules/user/user.module).
  • Notice: Undefined offset: 1085 in user_node_load() (line 3696 of /usr/share/drupal7/modules/user/user.module).
  • Notice: Trying to get property 'data' of non-object in user_node_load() (line 3696 of /usr/share/drupal7/modules/user/user.module).
  • Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in menu_set_active_trail() (line 2404 of /usr/share/drupal7/includes/menu.inc).

คือได้เขียนโปรแกรม socket programming ภาษา C แล้วรันบน fedora
เมื่อใช้คอมพิวเตอร์เพียงเครื่องเดียว เปิดสอง terminal เพื่อเป็น client และ server สามารถรันโปรแกรมได้ปกติ
แต่เมื่อใช้คอมพิวเตอร์สองตัว เชื่อมผ่านด้วย switch เมื่อรันโปรแกรม ฝั่ง client ตอบว่า No route to host
ทั้งๆที่สองเครื่องนี้ สามารถ ping หากันได้
.....ได้ลองนำโค้ดนี้ไปรันบน Ubuntu โดยใช้คอมพิวเตอร์สองตัว เชื่อมผ่านด้วย switch เช่นกัน สามารถรันได้ปกติค่ะ.....
ใครพอจะทราบว่าเป็นเพราะอะไร และพอจะแนะนำวิธีแก้ให้ ก็ขอขอบคุณมา ณ ที่นี้ด้วยคะ

Projects: 
Topic: